gliga / ekstazi Goto Github PK
View Code? Open in Web Editor NEWSoftware testing optimization tool
License: Apache License 2.0
Software testing optimization tool
License: Apache License 2.0
Do we have support of ekstazi for scala projects using sbt? I tried adding following sbt dependencies to scala project, ran scalatests for first time and then ran scala tests with changes but seems like all the tests ran on second run as well.
https://mvnrepository.com/artifact/org.ekstazi/org.ekstazi.core/5.3.0
https://mvnrepository.com/artifact/org.ekstazi/org.ekstazi.scalatest/5.3.0
Can someone please tell me if ekstazi supports sbt projects and what is the correct way to run ekstazi?
It would be great if Ekstazi could be used with Gradle, in addition to the extant Maven and Ant support. Or perhaps the existing support is sufficient to use Ekstazi with Gradle? If so, some documentation on how to do so would be appreciated. Thanks!
Hi!
I'm trying to run the Maven plugin from a folder located under "c:\users\user123\myproj". It seems this path is resolved "to c:\documents and settings\user123\myproj" which causes the goal to fail, most likely because of the spaces. If I override to the former one everything works fine, but it will obviously not be very portable...
Would be great if this issue could be fixed, this plugin looks very nice!
/ Daniel
If including ekstazi as a maven plugin in pom.xml, it requires parameter for maven-surefire-plugin. Although ekstazi will create a default excludes list file for the pom.xml, it seems that it ignores all sub-packages and may cause "Could not access excludesFile" in later maven running process.
I’m testing the ekstazi-gradle-plugin with my mongo-java-server project.
Unfortunately, the Spring integration test fails to initialize with the following stacktrace:
java.lang.UnsupportedOperationException
at org.ekstazi.monitor.ReflectionMonitor.getTypeName(Unknown Source)
at org.springframework.util.ClassUtils.getQualifiedName(ClassUtils.java:497)
at org.springframework.util.ClassUtils.getShortName(ClassUtils.java:434)
at org.springframework.core.style.DefaultToStringStyler.styleStart(DefaultToStringStyler.java:59)
at org.springframework.core.style.ToStringCreator.<init>(ToStringCreator.java:75)
at org.springframework.core.style.ToStringCreator.<init>(ToStringCreator.java:54)
at org.springframework.test.context.ContextConfigurationAttributes.toString(ContextConfigurationAttributes.java:372)
at java.util.Formatter$FormatSpecifier.printString(Formatter.java:2886)
at java.util.Formatter$FormatSpecifier.print(Formatter.java:2763)
at java.util.Formatter.format(Formatter.java:2520)
at java.util.Formatter.format(Formatter.java:2455)
at java.lang.String.format(String.java:2940)
at org.springframework.test.context.support.AbstractDelegatingSmartContextLoader.delegateProcessing(AbstractDelegatingSmartContextLoader.java:95)
at org.springframework.test.context.support.AbstractDelegatingSmartContextLoader.processContextConfiguration(AbstractDelegatingSmartContextLoader.java:170)
at org.springframework.test.context.support.AbstractTestContextBootstrapper.buildMergedContextConfiguration(AbstractTestContextBootstrapper.java:360)
at org.springframework.test.context.support.AbstractTestContextBootstrapper.buildDefaultMergedContextConfiguration(AbstractTestContextBootstrapper.java:312)
at org.springframework.test.context.support.AbstractTestContextBootstrapper.buildMergedContextConfiguration(AbstractTestContextBootstrapper.java:265)
at org.springframework.test.context.support.AbstractTestContextBootstrapper.buildTestContext(AbstractTestContextBootstrapper.java:108)
at org.springframework.test.context.TestContextManager.<init>(TestContextManager.java:135)
at org.springframework.test.context.TestContextManager.<init>(TestContextManager.java:120)
at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.createTestContextManager(SpringJUnit4ClassRunner.java:151)
at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.<init>(SpringJUnit4ClassRunner.java:142)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at org.junit.internal.builders.AnnotatedBuilder.buildRunner(AnnotatedBuilder.java:104)
at org.junit.internal.builders.AnnotatedBuilder.runnerForClass(AnnotatedBuilder.java:86)
at org.ekstazi.junit.JUnit4Monitor.runnerForClass(Unknown Source)
at org.junit.runners.model.RunnerBuilder.safeRunnerForClass(RunnerBuilder.java:59)
at org.junit.internal.builders.AllDefaultPossibilitiesBuilder.runnerForClass(AllDefaultPossibilitiesBuilder.java:26)
at org.ekstazi.junit.JUnit4Monitor.runnerForClass(Unknown Source)
at org.junit.runners.model.RunnerBuilder.safeRunnerForClass(RunnerBuilder.java:59)
at org.junit.internal.requests.ClassRequest.getRunner(ClassRequest.java:33)
at org.gradle.api.internal.tasks.testing.junit.JUnitTestClassExecutor.runTestClass(JUnitTestClassExecutor.java:88)
at org.gradle.api.internal.tasks.testing.junit.JUnitTestClassExecutor.execute(JUnitTestClassExecutor.java:59)
at org.gradle.api.internal.tasks.testing.junit.JUnitTestClassExecutor.execute(JUnitTestClassExecutor.java:39)
at org.gradle.api.internal.tasks.testing.junit.AbstractJUnitTestClassProcessor.processTestClass(AbstractJUnitTestClassProcessor.java:66)
at org.gradle.api.internal.tasks.testing.SuiteTestClassProcessor.processTestClass(SuiteTestClassProcessor.java:51)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:35)
at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:24)
at org.gradle.internal.dispatch.ContextClassLoaderDispatch.dispatch(ContextClassLoaderDispatch.java:32)
at org.gradle.internal.dispatch.ProxyDispatchAdapter$DispatchingInvocationHandler.invoke(ProxyDispatchAdapter.java:93)
at com.sun.proxy.$Proxy1.processTestClass(Unknown Source)
at org.gradle.api.internal.tasks.testing.worker.TestWorker.processTestClass(TestWorker.java:109)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:35)
at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:24)
at org.gradle.internal.remote.internal.hub.MessageHubBackedObjectConnection$DispatchWrapper.dispatch(MessageHubBackedObjectConnection.java:146)
at org.gradle.internal.remote.internal.hub.MessageHubBackedObjectConnection$DispatchWrapper.dispatch(MessageHubBackedObjectConnection.java:128)
at org.gradle.internal.remote.internal.hub.MessageHub$Handler.run(MessageHub.java:404)
at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:63)
at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:46)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:55)
at java.lang.Thread.run(Thread.java:748)
Using Ekstazi with Java 9 resolves in an illegal access warning:
[junit] WARNING: An illegal reflective access operation has occurred
[junit] WARNING: Illegal reflective access by org.ekstazi.monitor.CoverageMonitor (org.ekstazi.core-4.6.0.jar) to constructor java.io.File(java.lang.String,int)
[junit] WARNING: Please consider reporting this to the maintainers of org.ekstazi.monitor.CoverageMonitor
[junit] WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
[junit] WARNING: All illegal access operations will be denied in a future release
Please fix this :)
I like to integrate ekstazi in eclipse tycho tests, currently it doesn't work due urls of classes and class loading issues.
Is the code going to be open sourced?
Hi Milos,
I came across the following bug in Ekstazi: When you access a static field, Ekstazi is recording that we depend on the class that the access-site bytecode says owns the field. But this may not necessarily be the class that actually declares the field. Consider the case where interface I declares field f, and Class C implements I. If I access the field as “C.f” then during the first test that runs, Ekstazi will see a dependency on I (because I will have its clinit called), but in the second test that runs, there will not be the dependency on I (which there should be), there will be just the dependency on C (which it does not actually depend on, by the way - accessing this field will NOT trigger the initialization of C).
I've attached a small example that demonstrate this. Build and test it, then change the declared array length of “field” on the interface - this should cause both tests to be selected to run, but only one does.
If you are planning to make Ekstazi open source I’d be happy to just send a pull request with a patch :) We have a few tricks for handling this sort of dynamic resolution of interface fields in the new version of VMVM - the old version required advanced knowledge of the entire class hierarchy (not a great requirement), but now we do it entirely dynamically.
Im unit testing my android app with ekstazi gradle plugin
i use kotlin, powermock, mockk
but test executed with this error
java.lang.NoSuchMethodError: org.ekstazi.monitor.ReflectionMonitor.hashCode(Ljava/lang/Class;)I
16:26:15.099 [DEBUG] [TestEventLogger] at kotlin.reflect.jvm.internal.components.ReflectKotlinClass.hashCode(ReflectKotlinClass.kt:73)
16:26:15.099 [DEBUG] [TestEventLogger] at java.util.concurrent.ConcurrentHashMap.get(ConcurrentHashMap.java:936)
16:26:15.099 [DEBUG] [TestEventLogger] at kotlin.reflect.jvm.internal.impl.storage.LockBasedStorageManager$MapBasedMemoizedFunction.invoke(LockBasedStorageManager.java:394)
16:26:15.099 [DEBUG] [TestEventLogger] at kotlin.reflect.jvm.internal.impl.storage.LockBasedStorageManager$MapBasedMemoizedFunctionToNotNull.invoke(LockBasedStorageManager.java:483)
16:26:15.099 [DEBUG] [TestEventLogger] at kotlin.reflect.jvm.internal.impl.load.kotlin.AbstractBinaryClassAnnotationAndConstantLoader.findClassAndLoadMemberAnnotations(AbstractBinaryClassAnnotationAndConstantLoader.kt:143)
16:26:15.099 [DEBUG] [TestEventLogger] at kotlin.reflect.jvm.internal.impl.load.kotlin.AbstractBinaryClassAnnotationAndConstantLoader.findClassAndLoadMemberAnnotations$default(AbstractBinaryClassAnnotationAndConstantLoader.kt:137)
16:26:15.099 [DEBUG] [TestEventLogger] at kotlin.reflect.jvm.internal.impl.load.kotlin.AbstractBinaryClassAnnotationAndConstantLoader.loadCallableAnnotations(AbstractBinaryClassAnnotationAndConstantLoader.kt:101)
16:26:15.099 [DEBUG] [TestEventLogger] at kotlin.reflect.jvm.internal.impl.serialization.deserialization.MemberDeserializer$getAnnotations$1.invoke(MemberDeserializer.kt:234)
16:26:15.099 [DEBUG] [TestEventLogger] at kotlin.reflect.jvm.internal.impl.serialization.deserialization.MemberDeserializer$getAnnotations$1.invoke(MemberDeserializer.kt:33)
16:26:15.099 [DEBUG] [TestEventLogger] at kotlin.reflect.jvm.internal.impl.storage.LockBasedStorageManager$LockBasedLazyValue.invoke(LockBasedStorageManager.java:323)
16:26:15.099 [DEBUG] [TestEventLogger] at kotlin.reflect.jvm.internal.impl.storage.LockBasedStorageManager$LockBasedNotNullLazyValue.invoke(LockBasedStorageManager.java:370)
16:26:15.099 [DEBUG] [TestEventLogger] at kotlin.reflect.jvm.internal.impl.storage.StorageKt.getValue(storage.kt:39)
16:26:15.099 [DEBUG] [TestEventLogger] at kotlin.reflect.jvm.internal.impl.serialization.deserialization.descriptors.DeserializedAnnotationsWithPossibleTargets.getAnnotations(DeserializedAnnotations.kt)
16:26:15.099 [DEBUG] [TestEventLogger] at kotlin.reflect.jvm.internal.impl.serialization.deserialization.descriptors.DeserializedAnnotationsWithPossibleTargets.iterator(DeserializedAnnotations.kt:64)
16:26:15.099 [DEBUG] [TestEventLogger] at kotlin.reflect.jvm.internal.UtilKt.computeAnnotations(util.kt:190)
16:26:15.099 [DEBUG] [TestEventLogger] at kotlin.reflect.jvm.internal.KCallableImpl$annotations_$1.invoke(KCallableImpl.kt:41)
16:26:15.099 [DEBUG] [TestEventLogger] at kotlin.reflect.jvm.internal.KCallableImpl$annotations_$1.invoke(KCallableImpl.kt:28)
16:26:15.099 [DEBUG] [TestEventLogger] at kotlin.reflect.jvm.internal.ReflectProperties$LazySoftVal.invoke(ReflectProperties.java:93)
16:26:15.099 [DEBUG] [TestEventLogger] at kotlin.reflect.jvm.internal.KCallableImpl.getAnnotations(KCallableImpl.kt:43)
16:26:15.099 [DEBUG] [TestEventLogger] at io.mockk.impl.annotations.JvmMockInitializer.assignMockK(JvmMockInitializer.kt:288)
16:26:15.099 [DEBUG] [TestEventLogger] at io.mockk.impl.annotations.JvmMockInitializer.initMock(JvmMockInitializer.kt:36)
16:26:15.099 [DEBUG] [TestEventLogger] at io.mockk.impl.annotations.JvmMockInitializer.initAnnotatedMocks(JvmMockInitializer.kt:21)
16:26:15.099 [DEBUG] [TestEventLogger] at co.styletheory.android.testkit.unitTest.BaseUnitTest.setup(BaseUnitTest.kt:38)
16:26:15.099 [DEBUG] [TestEventLogger] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
16:26:15.099 [DEBUG] [TestEventLogger] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
16:26:15.099 [DEBUG] [TestEventLogger] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
16:26:15.099 [DEBUG] [TestEventLogger] at java.lang.reflect.Method.invoke(Method.java:498)
16:26:15.099 [DEBUG] [TestEventLogger] at org.junit.internal.runners.MethodRoadie.runBefores(MethodRoadie.java:133)
16:26:15.099 [DEBUG] [TestEventLogger] at org.junit.internal.runners.MethodRoadie.runBeforesThenTestThenAfters(MethodRoadie.java:96)
16:26:15.099 [DEBUG] [TestEventLogger] at org.powermock.modules.junit4.internal.impl.PowerMockJUnit44RunnerDelegateImpl$PowerMockJUnit44MethodRunner.executeTest(PowerMockJUnit44RunnerDelegateImpl.java:310)
16:26:15.099 [DEBUG] [TestEventLogger] at org.powermock.modules.junit4.internal.impl.PowerMockJUnit47RunnerDelegateImpl$PowerMockJUnit47MethodRunner.executeTestInSuper(PowerMockJUnit47RunnerDelegateImpl.java:131)
16:26:15.099 [DEBUG] [TestEventLogger] at org.powermock.modules.junit4.internal.impl.PowerMockJUnit47RunnerDelegateImpl$PowerMockJUnit47MethodRunner.access$100(PowerMockJUnit47RunnerDelegateImpl.java:59)
16:26:15.099 [DEBUG] [TestEventLogger] at org.powermock.modules.junit4.internal.impl.PowerMockJUnit47RunnerDelegateImpl$PowerMockJUnit47MethodRunner$TestExecutorStatement.evaluate(PowerMockJUnit47RunnerDelegateImpl.java:147)
16:26:15.099 [DEBUG] [TestEventLogger] at org.powermock.modules.junit4.internal.impl.PowerMockJUnit47RunnerDelegateImpl$PowerMockJUnit47MethodRunner.evaluateStatement(PowerMockJUnit47RunnerDelegateImpl.java:107)
16:26:15.099 [DEBUG] [TestEventLogger] at org.powermock.modules.junit4.internal.impl.PowerMockJUnit47RunnerDelegateImpl$PowerMockJUnit47MethodRunner.executeTest(PowerMockJUnit47RunnerDelegateImpl.java:82)
16:26:15.099 [DEBUG] [TestEventLogger] at org.powermock.modules.junit4.internal.impl.PowerMockJUnit44RunnerDelegateImpl$PowerMockJUnit44MethodRunner.runBeforesThenTestThenAfters(PowerMockJUnit44RunnerDelegateImpl.java:298)
16:26:15.099 [DEBUG] [TestEventLogger] at org.junit.internal.runners.MethodRoadie.runTest(MethodRoadie.java:87)
16:26:15.099 [DEBUG] [TestEventLogger] at org.junit.internal.runners.MethodRoadie.run(MethodRoadie.java:50)
16:26:15.099 [DEBUG] [TestEventLogger] at org.powermock.modules.junit4.internal.impl.PowerMockJUnit44RunnerDelegateImpl.invokeTestMethod(PowerMockJUnit44RunnerDelegateImpl.java:218)
16:26:15.099 [DEBUG] [TestEventLogger] at org.powermock.modules.junit4.internal.impl.PowerMockJUnit44RunnerDelegateImpl.runMethods(PowerMockJUnit44RunnerDelegateImpl.java:160)
16:26:15.099 [DEBUG] [TestEventLogger] at org.powermock.modules.junit4.internal.impl.PowerMockJUnit44RunnerDelegateImpl$1.run(PowerMockJUnit44RunnerDelegateImpl.java:134)
16:26:15.099 [DEBUG] [TestEventLogger] at org.junit.internal.runners.ClassRoadie.runUnprotected(ClassRoadie.java:34)
16:26:15.099 [DEBUG] [TestEventLogger] at org.junit.internal.runners.ClassRoadie.runProtected(ClassRoadie.java:44)
16:26:15.099 [DEBUG] [TestEventLogger] at org.powermock.modules.junit4.internal.impl.PowerMockJUnit44RunnerDelegateImpl.run(PowerMockJUnit44RunnerDelegateImpl.java:136)
16:26:15.099 [DEBUG] [TestEventLogger] at org.powermock.modules.junit4.common.internal.impl.JUnit4TestSuiteChunkerImpl.run(JUnit4TestSuiteChunkerImpl.java:121)
16:26:15.099 [DEBUG] [TestEventLogger] at org.powermock.modules.junit4.common.internal.impl.AbstractCommonPowerMockRunner.run(AbstractCommonPowerMockRunner.java:57)
16:26:15.099 [DEBUG] [TestEventLogger] at org.powermock.modules.junit4.PowerMockRunner.run(PowerMockRunner.java:59)
16:26:15.099 [DEBUG] [TestEventLogger] at org.ekstazi.junit.CoverageRunner.run(Unknown Source)
16:26:15.099 [DEBUG] [TestEventLogger] at org.gradle.api.internal.tasks.testing.junit.JUnitTestClassExecutor.runTestClass(JUnitTestClassExecutor.java:106)
16:26:15.099 [DEBUG] [TestEventLogger] at org.gradle.api.internal.tasks.testing.junit.JUnitTestClassExecutor.execute(JUnitTestClassExecutor.java:58)
16:26:15.099 [DEBUG] [TestEventLogger] at org.gradle.api.internal.tasks.testing.junit.JUnitTestClassExecutor.execute(JUnitTestClassExecutor.java:38)
16:26:15.099 [DEBUG] [TestEventLogger] at org.gradle.api.internal.tasks.testing.junit.AbstractJUnitTestClassProcessor.processTestClass(AbstractJUnitTestClassProcessor.java:66)
16:26:15.099 [DEBUG] [TestEventLogger] at org.gradle.api.internal.tasks.testing.SuiteTestClassProcessor.processTestClass(SuiteTestClassProcessor.java:51)
16:26:15.099 [DEBUG] [TestEventLogger] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
16:26:15.099 [DEBUG] [TestEventLogger] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
16:26:15.099 [DEBUG] [TestEventLogger] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
16:26:15.099 [DEBUG] [TestEventLogger] at java.lang.reflect.Method.invoke(Method.java:498)
16:26:15.099 [DEBUG] [TestEventLogger] at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:35)
16:26:15.099 [DEBUG] [TestEventLogger] at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:24)
16:26:15.099 [DEBUG] [TestEventLogger] at org.gradle.internal.dispatch.ContextClassLoaderDispatch.dispatch(ContextClassLoaderDispatch.java:32)
16:26:15.100 [DEBUG] [TestEventLogger] at org.gradle.internal.dispatch.ProxyDispatchAdapter$DispatchingInvocationHandler.invoke(ProxyDispatchAdapter.java:93)
16:26:15.100 [DEBUG] [TestEventLogger] at com.sun.proxy.$Proxy2.processTestClass(Unknown Source)
16:26:15.100 [DEBUG] [TestEventLogger] at org.gradle.api.internal.tasks.testing.worker.TestWorker.processTestClass(TestWorker.java:117)
16:26:15.100 [DEBUG] [TestEventLogger] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
16:26:15.100 [DEBUG] [TestEventLogger] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
16:26:15.100 [DEBUG] [TestEventLogger] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
16:26:15.100 [DEBUG] [TestEventLogger] at java.lang.reflect.Method.invoke(Method.java:498)
16:26:15.100 [DEBUG] [TestEventLogger] at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:35)
16:26:15.100 [DEBUG] [TestEventLogger] at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:24)
16:26:15.100 [DEBUG] [TestEventLogger] at org.gradle.internal.remote.internal.hub.MessageHubBackedObjectConnection$DispatchWrapper.dispatch(MessageHubBackedObjectConnection.java:155)
16:26:15.100 [DEBUG] [TestEventLogger] at org.gradle.internal.remote.internal.hub.MessageHubBackedObjectConnection$DispatchWrapper.dispatch(MessageHubBackedObjectConnection.java:137)
16:26:15.100 [DEBUG] [TestEventLogger] at org.gradle.internal.remote.internal.hub.MessageHub$Handler.run(MessageHub.java:404)
16:26:15.100 [DEBUG] [TestEventLogger] at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:63)
16:26:15.100 [DEBUG] [TestEventLogger] at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:46)
16:26:15.100 [DEBUG] [TestEventLogger] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
16:26:15.100 [DEBUG] [TestEventLogger] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
16:26:15.100 [DEBUG] [TestEventLogger] at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:55)
16:26:15.100 [DEBUG] [TestEventLogger] at java.lang.Thread.run(Thread.java:748)
Hi,
Can you please specify how this tool handles this scenario that I have mentioned below?
suppose there are two java classes file FileA and FileB.
FileA has two dependent test methods say TestMethod1, and TestMethod2.
FileB has two dependent test methods say TestMethod3, and TestMethod4.
The above information is stored in a dependency coverage file.
Now there is a new commit in FileA which has caused it to depend on TestMethod4.
In the next run will TestMethod4 run? If it will then how are we handling this case.
I tried compiling the project today, and got the following errors:
[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] /home/ekstazi/org.ekstazi.core/src/main/java/org/ekstazi/io/FileRecorder.java:[175,5] method does not override or implement a method from a supertype
[ERROR] /home/ekstazi/org.ekstazi.core/src/main/java/org/ekstazi/io/FileRecorder.java:[179,5] method does not override or implement a method from a supertype
[ERROR] /home/ekstazi/org.ekstazi.core/src/main/java/org/ekstazi/io/FileRecorder.java:[195,5] method does not override or implement a method from a supertype
[INFO] 3 errors
[INFO] -------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary for org.ekstazi:org.ekstazi.parent 5.3.0:
[INFO]
[INFO] org.ekstazi:org.ekstazi.parent ..................... SUCCESS [ 0.004 s]
[INFO] org.ekstazi:org.ekstazi.core ....................... FAILURE [ 5.014 s]
[INFO] org.ekstazi:ekstazi-maven-plugin ................... SKIPPED
[INFO] org.ekstazi:org.ekstazi.core.test .................. SKIPPED
[INFO] org.ekstazi:ekstazi-maven-plugin.test .............. SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 5.128 s
[INFO] Finished at: 2020-08-17T07:27:33Z
[INFO] ------------------------------------------------------------------------
The referenced methods are the following:
mockito is not working well with ekstazi.
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<version>4.1.0</version>
</dependency>
java.lang.IllegalStateException: Could not initialize plugin: interface org.mockito.plugins.MockMaker (alternate: null)
Caused by: java.lang.IllegalStateException: Internal problem occurred, please report it. Mockito is unable to load the default implementation of class that is a part of Mockito distribution. Failed to load interface org.mockito.plugins.MockMaker
I'm using ekstazi to test jpetstore. But it uses JUnit Jupiter(JUnit 5) to write tests. So ekstazi doesn't record any tests. It seems that ekstazi's JUitCTF doesn't instrument the Test Class.
Are you planning to support JUnit5?
I tried implementing ekstazi in my project and see it picked up small set of tests while running it through ekstazi. But there was no way to see a report that tells us what all tests are actually run.
As stated in title. The mvn clean goal should remove all directories created by ekstazi. This is especially helpful when running multiple times and for those of us who are not rm -rf **/.ekstazi
experts. (Don't run that command, I think it will remove all directories in your cwd...)
I tried ekstazi to run test cases in java project with maven then:
Run for the first time the passed test cases
I tried changing a function that used the test function and then running it again, but now ekstazi has skipped all my tests even though I changed the function to make the test function wrong.
Am I doing something wrong? Or the project doesn't support that?
Env: ekstazi 5.3, maven 4.0, junit 4.13.2
Link project: https://github.com/youniginzu1/sb-demo-with-ekstazi
When I change the code in calculateSum() function in HelloService.java the test cases in HelloServiceTests.java are not run again.
I'm trying to run Ekstazi on newly created maven project, but the ekstazi:ekstazi
goal always fails with a NullPointerException.
Generate a new project with
mvn -B archetype:generate \
-DarchetypeGroupId=org.apache.maven.archetypes \
-DgroupId=com.mycompany.app \
-DartifactId=my-app
Then add the Surefire and Ekstazi plugins as in the guide and run
mvn ekstazi:ekstazi
I've run mvn ekstazi:ekstazi -X
to get the debugging log and stored it here
When Ekstazi is called from Ant on a Windows environment, the path to the Ekstazi core jar is constructed incorrectly and the JUnit tests are marked as failed:
[ekstazi:select] Ekstazi Ant: version = 4.6.1
[ekstazi:select] Ekstazi Ant: jar = file:/C:/Users/wouter/R_20.1.0/lib/org.ekstazi.core-4.6.1.jar
[junit] Error occurred during initialization of VM
[junit] agent library failed to init: instrument
[junit] Error opening zip file or JAR manifest missing : /C:/Users/wouter/R_20.1.0/lib/org.ekstazi.core-4.6.1.jar
[junit] Running MyTest
[junit] Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0 sec
This happens also when the path to the jar in the build.xml file is defined as
C:\Users\wouter\R_20.1.0\lib\org.ekstazi.core-4.6.1.jar
Please confirm and fix this issue. Many thanks in advance!
Hello, I noticed that Ekstazi does not instrument methods like constructors when handling programs with "ForkMode". Why doesn't the Ekstazi tool instrument methods to collect dependencies when testing programs with fork in pom.xml?
Hi,
I wonder if there is a way that I can get access to the graph (source file to test file mappings) that gets built by ekstazi after a certain run.
Hi,
Getting below error when trying to run with Ant. Works well with Maven.
ekstazi:select] Ekstazi Ant: version = 4.6.1
[ekstazi:select] Ekstazi Ant: jar = file:/C:/Users/wouter/R_20.1.0/lib/org.ekstazi.core-4.6.1.jar
[junit] Error occurred during initialization of VM
[junit] agent library failed to init: instrument
[junit] Error opening zip file or JAR manifest missing : /C:/Users/wouter/R_20.1.0/lib/org.ekstazi.core-4.6.1.jar
[junit] Running MyTest
[junit] Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0 sec
Tried with other versions on core jar as well but getting same error. Also checked that jar exists and isReadble.
Any help will be appreciated.
Thanks
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.