Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Problem

Tests that run with PowerMock are not reporting coverage

...

If you want to capture coverage for classes run with PowerMock, you need to first upgrade to at lease version 1.7.1 of PowerMock.
Then you can remove the SeaLights restriction of PowerMock by passing the Jvm param sl.classLoadersExcluded=none

Doing so depending on your setup:

Jenkins Maven build step:

UnderĀ 'Invoke top-level Maven targets with SeaLights Continuous Testing'->SeaLights...->SeaLights Advanced...->'Additional Arguments' add 'sealightsJvmParams=sl.classLoadersExcluded:none'

Maven Automatic configurationĀ 

Edit your JSON file to include a new JvmParams

Code Block
languagejs
{
  ...  
  "sealightsJvmParams": {"sl.classLoadersExcluded":"none"},
  ...
}


Maven pom.xml

In the configuration section add an entry for 'classLoadersExcluded' set to none like the following:

Code Block
languagexml
<profile>
	<id>sealights</id>
    	<build>
        	<plugins>
            	<plugin>
                	<groupId>io.sealights.on-premise.agents.plugin</groupId>
					...
					<configuration>
						...
						<classLoadersExcluded>none</classLoadersExcluded>
					</configuration>
                    <executions>
					...

Gradle build.gradle

In the sealights section add a parameter called 'classLoadersExcluded' set to none like in the following:

Code Block
allprojects { p ->
    if(project.hasProperty('sealights')){
        apply plugin: 'io.sealights.on-premise.agents.plugin.sealights-gradle-plugin'
        sealights {
			...
			classLoadersExcluded = "none"
	}
}

Command line (Java CLI)

Pass the -Dsl.classLoadersExcluded=none to the JVM:

...

Page Properties
hiddentrue


Related issues