spek icon indicating copy to clipboard operation
spek copied to clipboard

[IDEA] Test framework quit unexpectedly

Open Tapchicoma opened this issue 5 years ago • 28 comments

Whenever I try to run any spek test from IntelliJ IDEA - I got "Test framework quit unexpectedly". Running same tests from command line via ./gradlew :library:core:test produces test results.

IDEA test console output:

Testing started at 8:30 ...
/usr/lib/jvm/oracle-jdk-bin-1.8/bin/java -javaagent:/home/user/jetbrains/apps/IDEA-U/ch-0/191.7479.19/lib/idea_rt.jar=43655:/home/user/jetbrains/apps/IDEA-U/ch-0/191.7479.19/bin -Dfile.encoding=UTF-8 -classpath "/usr/lib/jvm/oracle-jdk-bin-1.8/jre/lib/charsets.jar:/usr/lib/jvm/oracle-jdk-bin-1.8/jre/lib/deploy.jar:/usr/lib/jvm/oracle-jdk-bin-1.8/jre/lib/ext/cldrdata.jar:/usr/lib/jvm/oracle-jdk-bin-1.8/jre/lib/ext/dnsns.jar:/usr/lib/jvm/oracle-jdk-bin-1.8/jre/lib/ext/jaccess.jar:/usr/lib/jvm/oracle-jdk-bin-1.8/jre/lib/ext/localedata.jar:/usr/lib/jvm/oracle-jdk-bin-1.8/jre/lib/ext/nashorn.jar:/usr/lib/jvm/oracle-jdk-bin-1.8/jre/lib/ext/sunec.jar:/usr/lib/jvm/oracle-jdk-bin-1.8/jre/lib/ext/sunjce_provider.jar:/usr/lib/jvm/oracle-jdk-bin-1.8/jre/lib/ext/sunpkcs11.jar:/usr/lib/jvm/oracle-jdk-bin-1.8/jre/lib/ext/zipfs.jar:/usr/lib/jvm/oracle-jdk-bin-1.8/jre/lib/javaws.jar:/usr/lib/jvm/oracle-jdk-bin-1.8/jre/lib/jce.jar:/usr/lib/jvm/oracle-jdk-bin-1.8/jre/lib/jsse.jar:/usr/lib/jvm/oracle-jdk-bin-1.8/jre/lib/management-agent.jar:/usr/lib/jvm/oracle-jdk-bin-1.8/jre/lib/plugin.jar:/usr/lib/jvm/oracle-jdk-bin-1.8/jre/lib/resources.jar:/usr/lib/jvm/oracle-jdk-bin-1.8/jre/lib/rt.jar:/home/user/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlinx/kotlinx-coroutines-core/1.2.1/3839faf625f4197acaeceeb6da000f011a2acb49/kotlinx-coroutines-core-1.2.1.jar:/home/user/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib/1.3.31/11289d20fd95ae219333f3456072be9f081c30cc/kotlin-stdlib-1.3.31.jar:/home/user/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib-common/1.3.31/20c34a04ea25cb1ef0139598bd67c764562cb170/kotlin-stdlib-common-1.3.31.jar:/home/user/.gradle/caches/modules-2/files-2.1/org.jetbrains/annotations/13.0/919f0dfe192fb4e063e7dacadee7f8bb9a2672a9/annotations-13.0.jar:/home/user/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlinx/kotlinx-coroutines-test/1.2.1/b518aae366904af1b36a3787eea0e8d4a1b0a0c3/kotlinx-coroutines-test-1.2.1.jar:/home/user/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-reflect/1.3.31/5a426a5ada97967ca60fba495eeaa66cfa7c9e2f/kotlin-reflect-1.3.31.jar:/home/user/.gradle/caches/modules-2/files-2.1/org.spekframework.spek2/spek-dsl-jvm/2.0.5/9fbb9be27cda239c2380da455e10ff61b82827e5/spek-dsl-jvm-2.0.5.jar:/home/user/.gradle/caches/modules-2/files-2.1/junit/junit/4.12/2973d150c0dc1fefe998f834810d68f278ea58ec/junit-4.12.jar:/home/user/.gradle/caches/modules-2/files-2.1/org.hamcrest/hamcrest-core/1.3/42a25dc3219429f0e5d060061f71acb49bf010a0/hamcrest-core-1.3.jar:/home/user/.gradle/caches/modules-2/files-2.1/org.spekframework.spek2/spek-runner-junit5/2.0.5/eabd314258084f800b1cef8b03678d0d4db7f5b4/spek-runner-junit5-2.0.5.jar:/home/user/.gradle/caches/modules-2/files-2.1/org.spekframework.spek2/spek-runtime-jvm/2.0.5/feec0a2d1b70f2ed14ad0376930bdc4295e9801d/spek-runtime-jvm-2.0.5.jar:/home/user/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib-jdk8/1.3.30/459999be0d6ac844dd3d2ca85c2daf14deb5f7f0/kotlin-stdlib-jdk8-1.3.30.jar:/home/user/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib-jdk7/1.3.30/bf0edcf669e446e0d903a0681190d1e3df969ac4/kotlin-stdlib-jdk7-1.3.30.jar:/home/user/.gradle/caches/modules-2/files-2.1/org.junit.platform/junit-platform-engine/1.4.2/52b70561f65bb397b054876f2d8c6f30b06c3581/junit-platform-engine-1.4.2.jar:/home/user/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlinx/kotlinx-coroutines-core-common/1.2.0/ecfffae5e39ddda7c27c34b801617ec458b0e6f0/kotlinx-coroutines-core-common-1.2.0.jar:/home/user/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlinx/kotlinx-coroutines-debug/1.2.1/5ca837c9ef40e195327d5329a1eea0e6fa17a528/kotlinx-coroutines-debug-1.2.1.jar:/home/user/.gradle/caches/modules-2/files-2.1/org.junit.platform/junit-platform-commons/1.4.2/37993dc807ca253aa347be8968a0ae7b70642dbc/junit-platform-commons-1.4.2.jar:/home/user/.gradle/caches/modules-2/files-2.1/org.apiguardian/apiguardian-api/1.0.0/3ef5276905e36f4d8055fe3cb0bdcc7503ffc85d/apiguardian-api-1.0.0.jar:/home/user/.gradle/caches/modules-2/files-2.1/org.opentest4j/opentest4j/1.1.1/efd9f971e91074491ea55b19f67b13470cf4fcdd/opentest4j-1.1.1.jar:/home/user/.gradle/caches/modules-2/files-2.1/io.github.classgraph/classgraph/4.0.6/7fe1e7464ffd40c7333b8bbf53c4d73a7cbd7b4c/classgraph-4.0.6.jar:/home/user/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlinx/atomicfu-common/0.12.3/b09ed1e1b1a0996e0a3b6c454797d44788a21747/atomicfu-common-0.12.3.jar:/home/user/.IntelliJIdea2019.1/config/plugins/Spek Framework/lib/interop-jvm-2.0.5.jar" org.spekframework.ide.ConsoleKt --paths Y29t/ZnJlZWxldGljcw==/Y29yZWR1eA==/U2ltcGxlU3RvcmVUZXN0

Process finished with exit code 0

Env: IntelliJ IDEA 2019.1.3 Build #IU-191.7479.19 Spek: 2.0.5 Spek plugin: v2.0.5-IJ2019.1 (can't update any further) Repo: https://github.com/freeletics/coredux Java: 1.8.0_202

Tapchicoma avatar May 31 '19 06:05 Tapchicoma

@Tapchicoma just cloned the project and it worked for me.

Screen Shot 2019-05-31 at 5 00 19 pm

What kotlin plugin version do you have?

raniejade avatar May 31 '19 07:05 raniejade

@raniejade Kotlin 1.3.31-release-IJ2019.1-1

Tapchicoma avatar May 31 '19 07:05 Tapchicoma

Weird, I have the same version. Have you tried re-installing everything?

raniejade avatar May 31 '19 07:05 raniejade

Tried to clean the project .idea/ and *.iml files and reimport it - still the same problem.

Is there any way to debug spek plugin/test run to get more info?

Tapchicoma avatar May 31 '19 07:05 Tapchicoma

How about reinstalling the plugins? Another way to debug is to run the command the ide outputs directly:

/usr/lib/jvm/oracle-jdk-bin-1.8/bin/java -javaagent:/home/user/jetbrains/apps/IDEA-U/ch-0/191.7479.19/lib/idea_rt.jar=43655:/home/user/jetbrains/apps/IDEA-U/ch-0/191.7479.19/bin -Dfile.encoding=UTF-8 -classpath "/usr/lib/jvm/oracle-jdk-bin-1.8/jre/lib/charsets.jar:/usr/lib/jvm/oracle-jdk-bin-1.8/jre/lib/deploy.jar:/usr/lib/jvm/oracle-jdk-bin-1.8/jre/lib/ext/cldrdata.jar:/usr/lib/jvm/oracle-jdk-bin-1.8/jre/lib/ext/dnsns.jar:/usr/lib/jvm/oracle-jdk-bin-1.8/jre/lib/ext/jaccess.jar:/usr/lib/jvm/oracle-jdk-bin-1.8/jre/lib/ext/localedata.jar:/usr/lib/jvm/oracle-jdk-bin-1.8/jre/lib/ext/nashorn.jar:/usr/lib/jvm/oracle-jdk-bin-1.8/jre/lib/ext/sunec.jar:/usr/lib/jvm/oracle-jdk-bin-1.8/jre/lib/ext/sunjce_provider.jar:/usr/lib/jvm/oracle-jdk-bin-1.8/jre/lib/ext/sunpkcs11.jar:/usr/lib/jvm/oracle-jdk-bin-1.8/jre/lib/ext/zipfs.jar:/usr/lib/jvm/oracle-jdk-bin-1.8/jre/lib/javaws.jar:/usr/lib/jvm/oracle-jdk-bin-1.8/jre/lib/jce.jar:/usr/lib/jvm/oracle-jdk-bin-1.8/jre/lib/jsse.jar:/usr/lib/jvm/oracle-jdk-bin-1.8/jre/lib/management-agent.jar:/usr/lib/jvm/oracle-jdk-bin-1.8/jre/lib/plugin.jar:/usr/lib/jvm/oracle-jdk-bin-1.8/jre/lib/resources.jar:/usr/lib/jvm/oracle-jdk-bin-1.8/jre/lib/rt.jar:/home/user/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlinx/kotlinx-coroutines-core/1.2.1/3839faf625f4197acaeceeb6da000f011a2acb49/kotlinx-coroutines-core-1.2.1.jar:/home/user/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib/1.3.31/11289d20fd95ae219333f3456072be9f081c30cc/kotlin-stdlib-1.3.31.jar:/home/user/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib-common/1.3.31/20c34a04ea25cb1ef0139598bd67c764562cb170/kotlin-stdlib-common-1.3.31.jar:/home/user/.gradle/caches/modules-2/files-2.1/org.jetbrains/annotations/13.0/919f0dfe192fb4e063e7dacadee7f8bb9a2672a9/annotations-13.0.jar:/home/user/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlinx/kotlinx-coroutines-test/1.2.1/b518aae366904af1b36a3787eea0e8d4a1b0a0c3/kotlinx-coroutines-test-1.2.1.jar:/home/user/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-reflect/1.3.31/5a426a5ada97967ca60fba495eeaa66cfa7c9e2f/kotlin-reflect-1.3.31.jar:/home/user/.gradle/caches/modules-2/files-2.1/org.spekframework.spek2/spek-dsl-jvm/2.0.5/9fbb9be27cda239c2380da455e10ff61b82827e5/spek-dsl-jvm-2.0.5.jar:/home/user/.gradle/caches/modules-2/files-2.1/junit/junit/4.12/2973d150c0dc1fefe998f834810d68f278ea58ec/junit-4.12.jar:/home/user/.gradle/caches/modules-2/files-2.1/org.hamcrest/hamcrest-core/1.3/42a25dc3219429f0e5d060061f71acb49bf010a0/hamcrest-core-1.3.jar:/home/user/.gradle/caches/modules-2/files-2.1/org.spekframework.spek2/spek-runner-junit5/2.0.5/eabd314258084f800b1cef8b03678d0d4db7f5b4/spek-runner-junit5-2.0.5.jar:/home/user/.gradle/caches/modules-2/files-2.1/org.spekframework.spek2/spek-runtime-jvm/2.0.5/feec0a2d1b70f2ed14ad0376930bdc4295e9801d/spek-runtime-jvm-2.0.5.jar:/home/user/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib-jdk8/1.3.30/459999be0d6ac844dd3d2ca85c2daf14deb5f7f0/kotlin-stdlib-jdk8-1.3.30.jar:/home/user/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib-jdk7/1.3.30/bf0edcf669e446e0d903a0681190d1e3df969ac4/kotlin-stdlib-jdk7-1.3.30.jar:/home/user/.gradle/caches/modules-2/files-2.1/org.junit.platform/junit-platform-engine/1.4.2/52b70561f65bb397b054876f2d8c6f30b06c3581/junit-platform-engine-1.4.2.jar:/home/user/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlinx/kotlinx-coroutines-core-common/1.2.0/ecfffae5e39ddda7c27c34b801617ec458b0e6f0/kotlinx-coroutines-core-common-1.2.0.jar:/home/user/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlinx/kotlinx-coroutines-debug/1.2.1/5ca837c9ef40e195327d5329a1eea0e6fa17a528/kotlinx-coroutines-debug-1.2.1.jar:/home/user/.gradle/caches/modules-2/files-2.1/org.junit.platform/junit-platform-commons/1.4.2/37993dc807ca253aa347be8968a0ae7b70642dbc/junit-platform-commons-1.4.2.jar:/home/user/.gradle/caches/modules-2/files-2.1/org.apiguardian/apiguardian-api/1.0.0/3ef5276905e36f4d8055fe3cb0bdcc7503ffc85d/apiguardian-api-1.0.0.jar:/home/user/.gradle/caches/modules-2/files-2.1/org.opentest4j/opentest4j/1.1.1/efd9f971e91074491ea55b19f67b13470cf4fcdd/opentest4j-1.1.1.jar:/home/user/.gradle/caches/modules-2/files-2.1/io.github.classgraph/classgraph/4.0.6/7fe1e7464ffd40c7333b8bbf53c4d73a7cbd7b4c/classgraph-4.0.6.jar:/home/user/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlinx/atomicfu-common/0.12.3/b09ed1e1b1a0996e0a3b6c454797d44788a21747/atomicfu-common-0.12.3.jar:/home/user/.IntelliJIdea2019.1/config/plugins/Spek Framework/lib/interop-jvm-2.0.5.jar" org.spekframework.ide.ConsoleKt --paths Y29t/ZnJlZWxldGljcw==/Y29yZWR1eA==/U2ltcGxlU3RvcmVUZXN0

btw, what test were you running?

raniejade avatar May 31 '19 07:05 raniejade

Tried to reinstall kotlin and spek plugins - same problem.

btw, what test were you running?

Any single test suite there. For example, SimpleStoreTest

Tapchicoma avatar May 31 '19 19:05 Tapchicoma

Btw, I can successfully run all tests from IDE in :library:core module.

Tapchicoma avatar May 31 '19 19:05 Tapchicoma

Super weird, tried running that and it works. What was the result when running the ff in the terminal:

/usr/lib/jvm/oracle-jdk-bin-1.8/bin/java -javaagent:/home/user/jetbrains/apps/IDEA-U/ch-0/191.7479.19/lib/idea_rt.jar=43655:/home/user/jetbrains/apps/IDEA-U/ch-0/191.7479.19/bin -Dfile.encoding=UTF-8 -classpath "/usr/lib/jvm/oracle-jdk-bin-1.8/jre/lib/charsets.jar:/usr/lib/jvm/oracle-jdk-bin-1.8/jre/lib/deploy.jar:/usr/lib/jvm/oracle-jdk-bin-1.8/jre/lib/ext/cldrdata.jar:/usr/lib/jvm/oracle-jdk-bin-1.8/jre/lib/ext/dnsns.jar:/usr/lib/jvm/oracle-jdk-bin-1.8/jre/lib/ext/jaccess.jar:/usr/lib/jvm/oracle-jdk-bin-1.8/jre/lib/ext/localedata.jar:/usr/lib/jvm/oracle-jdk-bin-1.8/jre/lib/ext/nashorn.jar:/usr/lib/jvm/oracle-jdk-bin-1.8/jre/lib/ext/sunec.jar:/usr/lib/jvm/oracle-jdk-bin-1.8/jre/lib/ext/sunjce_provider.jar:/usr/lib/jvm/oracle-jdk-bin-1.8/jre/lib/ext/sunpkcs11.jar:/usr/lib/jvm/oracle-jdk-bin-1.8/jre/lib/ext/zipfs.jar:/usr/lib/jvm/oracle-jdk-bin-1.8/jre/lib/javaws.jar:/usr/lib/jvm/oracle-jdk-bin-1.8/jre/lib/jce.jar:/usr/lib/jvm/oracle-jdk-bin-1.8/jre/lib/jsse.jar:/usr/lib/jvm/oracle-jdk-bin-1.8/jre/lib/management-agent.jar:/usr/lib/jvm/oracle-jdk-bin-1.8/jre/lib/plugin.jar:/usr/lib/jvm/oracle-jdk-bin-1.8/jre/lib/resources.jar:/usr/lib/jvm/oracle-jdk-bin-1.8/jre/lib/rt.jar:/home/user/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlinx/kotlinx-coroutines-core/1.2.1/3839faf625f4197acaeceeb6da000f011a2acb49/kotlinx-coroutines-core-1.2.1.jar:/home/user/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib/1.3.31/11289d20fd95ae219333f3456072be9f081c30cc/kotlin-stdlib-1.3.31.jar:/home/user/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib-common/1.3.31/20c34a04ea25cb1ef0139598bd67c764562cb170/kotlin-stdlib-common-1.3.31.jar:/home/user/.gradle/caches/modules-2/files-2.1/org.jetbrains/annotations/13.0/919f0dfe192fb4e063e7dacadee7f8bb9a2672a9/annotations-13.0.jar:/home/user/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlinx/kotlinx-coroutines-test/1.2.1/b518aae366904af1b36a3787eea0e8d4a1b0a0c3/kotlinx-coroutines-test-1.2.1.jar:/home/user/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-reflect/1.3.31/5a426a5ada97967ca60fba495eeaa66cfa7c9e2f/kotlin-reflect-1.3.31.jar:/home/user/.gradle/caches/modules-2/files-2.1/org.spekframework.spek2/spek-dsl-jvm/2.0.5/9fbb9be27cda239c2380da455e10ff61b82827e5/spek-dsl-jvm-2.0.5.jar:/home/user/.gradle/caches/modules-2/files-2.1/junit/junit/4.12/2973d150c0dc1fefe998f834810d68f278ea58ec/junit-4.12.jar:/home/user/.gradle/caches/modules-2/files-2.1/org.hamcrest/hamcrest-core/1.3/42a25dc3219429f0e5d060061f71acb49bf010a0/hamcrest-core-1.3.jar:/home/user/.gradle/caches/modules-2/files-2.1/org.spekframework.spek2/spek-runner-junit5/2.0.5/eabd314258084f800b1cef8b03678d0d4db7f5b4/spek-runner-junit5-2.0.5.jar:/home/user/.gradle/caches/modules-2/files-2.1/org.spekframework.spek2/spek-runtime-jvm/2.0.5/feec0a2d1b70f2ed14ad0376930bdc4295e9801d/spek-runtime-jvm-2.0.5.jar:/home/user/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib-jdk8/1.3.30/459999be0d6ac844dd3d2ca85c2daf14deb5f7f0/kotlin-stdlib-jdk8-1.3.30.jar:/home/user/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib-jdk7/1.3.30/bf0edcf669e446e0d903a0681190d1e3df969ac4/kotlin-stdlib-jdk7-1.3.30.jar:/home/user/.gradle/caches/modules-2/files-2.1/org.junit.platform/junit-platform-engine/1.4.2/52b70561f65bb397b054876f2d8c6f30b06c3581/junit-platform-engine-1.4.2.jar:/home/user/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlinx/kotlinx-coroutines-core-common/1.2.0/ecfffae5e39ddda7c27c34b801617ec458b0e6f0/kotlinx-coroutines-core-common-1.2.0.jar:/home/user/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlinx/kotlinx-coroutines-debug/1.2.1/5ca837c9ef40e195327d5329a1eea0e6fa17a528/kotlinx-coroutines-debug-1.2.1.jar:/home/user/.gradle/caches/modules-2/files-2.1/org.junit.platform/junit-platform-commons/1.4.2/37993dc807ca253aa347be8968a0ae7b70642dbc/junit-platform-commons-1.4.2.jar:/home/user/.gradle/caches/modules-2/files-2.1/org.apiguardian/apiguardian-api/1.0.0/3ef5276905e36f4d8055fe3cb0bdcc7503ffc85d/apiguardian-api-1.0.0.jar:/home/user/.gradle/caches/modules-2/files-2.1/org.opentest4j/opentest4j/1.1.1/efd9f971e91074491ea55b19f67b13470cf4fcdd/opentest4j-1.1.1.jar:/home/user/.gradle/caches/modules-2/files-2.1/io.github.classgraph/classgraph/4.0.6/7fe1e7464ffd40c7333b8bbf53c4d73a7cbd7b4c/classgraph-4.0.6.jar:/home/user/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlinx/atomicfu-common/0.12.3/b09ed1e1b1a0996e0a3b6c454797d44788a21747/atomicfu-common-0.12.3.jar:/home/user/.IntelliJIdea2019.1/config/plugins/Spek Framework/lib/interop-jvm-2.0.5.jar" org.spekframework.ide.ConsoleKt --paths Y29t/ZnJlZWxldGljcw==/Y29yZWR1eA==/U2ltcGxlU3RvcmVUZXN0

raniejade avatar May 31 '19 23:05 raniejade

same as from IDE - prints nothing and completes with exit code 0.

Tapchicoma avatar Jun 01 '19 06:06 Tapchicoma

I have the same problem as well. It works with kbox (https://github.com/robstoll/kbox) which is a MPP, it works with tutteli-spek-extension (https://github.com/robstoll/tutteli-spek-extensions) which is just a jvm project but does not with Atrium.

I am using:

IntelliJ IDEA 2019.1.2 (Ultimate Edition) Build #IU-191.7141.44, built on May 7, 2019 JRE: 1.8.0_202-release-1483-b49 amd64 JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o spek: 2.0.5 spek plugin: v2.0.5-IJ2019.1

To reproduce:

  • checkout https://github.com/robstoll/atrium/commit/452c8399998bc036c08363da25886a7632a15f77
  • open project in Intellij
  • navigate to ch.tutteli.atrium.api.cc.en_GB.AnyAssertionsSpec
  • try to run it from the gutter icon or via right click on the file -> run

Few things to note:

  • I am using spek 1.1.5 and spek 2.0.5 in the same project. Maybe that's the problem? I deactivate the spek1 plugin though and it still did not work.
  • delete all tests in atrium-api-cc-en_GB-jvm and then run all tests in atrium-api-cc-en_GB-common (by right clicking on the kotlin folder Run All in... => the IDE stops with No tests where found => could be a hint and the reason why the test framework stops unexpectedly in the other case, because it does not find the single test.

robstoll avatar Jun 01 '19 22:06 robstoll

thanks @robstoll, I'll investigate!

raniejade avatar Jun 01 '19 23:06 raniejade

@Tapchicoma do you have delegate build/run actions to Gradle enabled by any chance? and are you using the platform test runner or the gradle one?

raniejade avatar Jun 02 '19 01:06 raniejade

@robstoll I have a fix (somewhat) for your problem (see #720). Well, at least it fixed the test framework stops unexpectedly, but ClassNotFoundExceptions are showing up - not sure if it's a problem with IDE plugin or some bug in the project. Just waiting for the builds to finish, so you can test out a dev build.

raniejade avatar Jun 02 '19 01:06 raniejade

@Tapchicoma do you have delegate build/run actions to Gradle enabled by any chance? and are you using the platform test runner or the gradle one?

"Delegate build/run actions to Gradle" is disabled, but I tried with this setting enabled - same result.

"Platform test runner" is set to run the tests.

But you lead me to the way it starts working - By default I had in "Build, Execution, Deployment" -> "Gradle": Screenshot_20190602_082355 When I changed to this, I start seeing test results: Screenshot_20190602_082501

Tapchicoma avatar Jun 02 '19 06:06 Tapchicoma

@raniejade nice, don't worry about ClassNotFoundException if they happen in a -js project. That might well be a problem on my part. I pushed a draft so that you can already try out things-- I should have mentioned that, the build for it fails due to problems in -js projects (https://travis-ci.org/robstoll/atrium/jobs/540225562#L3608).

I tried out what Tapchicoma mentioned: I had already Build and run using Gradle (I guess because I have checked delegate build/run actions to Gradle), Activating Run tests using Gradle did not do the trick for me. Deactivating delegate build/run actions to Gradle neither

robstoll avatar Jun 02 '19 08:06 robstoll

@raniejade I fixed all project problems and had another look into it and found a few things (checkout https://github.com/robstoll/atrium/commit/bfbdaa089f1db99ffd0eb7fe2cfad32231c1f596):

  • AnyAssertionsSpec can still not be run within the IDE but is also not run via gradle
  • I have created a dummy Spek in the same file (called A) and this one can be run within the IDE and is also picked up when running the tests via gradle
  • I have created another dummy Spek which is a class and not an object (B) this one is fine as well
  • I have created an abstract class extending Spek and two subclasses, those cannot be run via IDE but are run via gradle -> I have created a separate issue for this one (#721).
  • I have created an abstract class extending Spek in another module and created two subclasses in the same file as AnyAssertionSpec -> those do not work either

Conclusion: I guess the problem in my case has something to do either with #720 as you mentioned or another classpath issue

ps: If I deselect Build and run using Gradle then A and B cannot be run within the IDE

robstoll avatar Jun 02 '19 14:06 robstoll

@robstoll can you try the latest dev builds including the IDE plugin?https://bintray.com/spekframework/spek-dev/spek2/2.1.0-alpha.0.1%2Bcb69d79. The dev build of the plugin can be downloaded here: https://plugins.jetbrains.com/plugin/10915-spek-framework/versions

raniejade avatar Jun 03 '19 06:06 raniejade

works :+1:

robstoll avatar Jun 03 '19 08:06 robstoll

@Tapchicoma I might have a new track why this fails. I changed a project from using OracleJDK to OpenJDK and now spek stops working as well. What jdk vendor do you use?

Edit: oh wow, false alarm, this time there was a compile error which intellij did not show me (compiling with gradle revealed it)

edit 2: fixed the compile error and it still does not run. I'll see if I can still get a oracleJDK 1.8 and if it runs then

robstoll avatar Jun 26 '19 18:06 robstoll

@robstoll still OracleJDK:

java version "1.8.0_202"
Java(TM) SE Runtime Environment (build 1.8.0_202-b08)
Java HotSpot(TM) 64-Bit Server VM (build 25.202-b08, mixed mode)

Tapchicoma avatar Jun 27 '19 06:06 Tapchicoma

oh man, sorry for the noise. I am on a new laptop and I used the regular spek plugin and not the dev version as advertised above. It works with dev (used 2.1.0-alpha.0.10+3ef9a70) for both OracleJDK and OpenJDK.

robstoll avatar Jun 27 '19 09:06 robstoll

I'll probably release the next version in ~2 weeks. Just finishing the move to azure pipelines (quite useful for building mpp projects) and gradle kotlin-dsl.

raniejade avatar Jun 28 '19 04:06 raniejade

Is there a way to see actual exception that caused the "unexpected quit"?

I've been experiencing this lately with Android Studio where this error happens randomly. Re-running same test (without any code changes) usually works fine afterwards.

matejdro avatar Dec 10 '19 07:12 matejdro

@matejdro did you figure out how to debug "Test framework quit unexpectedly"? I'm getting that error repeatedly with Spek 2.0.10 and AGP 3.6.1 but can't find any logs.

technoir42 avatar Mar 16 '20 12:03 technoir42

Sorry, I did not.

matejdro avatar Mar 16 '20 12:03 matejdro

In our case Test framework quit unexpectedly was caused by Spek's incompatibility with a newer version of Classgraph which came with KotlinFixture. We had 4.8.58 instead of 4.8.37.

technoir42 avatar Mar 18 '20 17:03 technoir42

I also am affected by that. Any hints on how I can debug it?

It also seems to be a problem with the IntelliJ IDEA integration, as it runs fine when I call Gradle from the command line.

I am using Kotlin 1.3.70, Spek 2.0.10, IntelliJ IDEA 2019.3.4, Spek Framework Plugin 2.0.10-IJ2019.3, Gradle 6.2.2 and Java 11.0.6 (Azul Zulu 11.37+17-CA).

manuelprinz avatar Apr 15 '20 09:04 manuelprinz

@manuelprinz I guess the quickest way to debug is building the plugin from source and making a change here: https://github.com/spekframework/spek/blob/2.x/spek-ide-plugin-interop-jvm/src/main/kotlin/org/spekframework/ide/console.kt#L14. Just wrap the whole method into a try-catch block, then printing the stacktrace.

raniejade avatar Apr 15 '20 09:04 raniejade