Closed sraiteri closed 5 years ago
Also cross-referencing https://github.com/raniejade/spek-idea-plugin/issues/71 and https://github.com/raniejade/spek-idea-plugin/issues/68
Can you guys test this build out? 0.6.1-studio3.3.zip
@raniejade,
0.6.1-studio3.3.zip works with Android Studio 3.3.0 (under the following configurations):
AGP 3.3.0, Gradle 5.1.1, Spek 1.2.1
AGP 3.2.1, Gradle 4.10.3, Spek 1.2.1
Thanks very much for the very fast resolution 😄 !
@raniejade how do you install that manually? I've only done it through Android Studio -> Preferences -> Plugins
@CACuzcatlan there should be an option to install from disk.
@CACuzcatlan that's the one.
Android Studio -> Preferences -> Plugins -> Install plugin from disk... (bottom right button)
After the standard Android Studio restart to initialise the plugin, you should see 0.6.1-studio3.3 is installed:
@sraiteri Thanks! Unfortunately, I'm still getting the issue where it says Nothing Here
when clicking on the gutter arrow in Android Studio. I'm running
Android Studio 3.3 AGP 3.3.0, Gradle 5.1.1, Spek 1.2.1
@CACuzcatlan - very strange. Do you have any test plugins competing at the JUnit platform level? What is the structure of your given/on/it
?
Here's what I see when I try to run individual tests in a Spek 1 test file:
Occasionally I've got to try to re-run from the gutter again, but the tests all run as expected.
@sraiteri I have that exact setup and I know it's not the tests because they were working before I upgraded to Android Studio 3.3.
I'm using Gradle Plugin 3.3.0, Gradle 5.1.1, Spek 1.2.1, Spek plugin 0.6.1-studio3.3
Android Studio 3.3 Build #AI-182.5107.16.33.5199772, built on December 24, 2018 JRE: 1.8.0_152-release-1248-b01 x86_64 JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o macOS 10.13.6
It's definitely an issue that started with AS 3.3 since nothing else has changed. The gutter always says Nothing here
. I've tried cleaning, invalidate cache/restart, reboot computer, etc. The tests run from terminal, but not from Android Studio. Doesn't matter which test file I try, all of them say Nothing here
in the gutter.
@CACuzcatlan what kotlin plugin version are you using?
@raniejade
The one from Android Studio -> Preferences -> Plugins
1.3.20-release-Studio3.3.1
In my gradle file under dependencies I had:
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.11"
I was getting the following warning:
Kotlin version that is used for building with Gradle (1.3.11) differs from the one bundled into the IDE plugin (1.3.20) more... (⌘F1)
so I change it to 1.3.20 and synced. The build completed without errors but I still see Nothing here
from the green arrow in the gutter.
@CACuzcatlan Are you able to share the project? If not, can you create a sample project that replicates the issue?
I'm not sure if this issue is Kotlin related - I have had similar issues before in other projects. Tests ran as part of Gradle fine, but failed to be detected from the IDE (the Nothing here
from plugin execution.
In most cases, it came down to some exclude group: org.junit.platform
items scattered through the test dependencies - legacy configuration to force the JUnit platform versions in older dependencies to align correctly. If you're testing with multiple test frameworks (this one had JUnit Vintage, JUnit Jupiter & Spek 1), the configuration can be a little to align the org.junit.platform
versions correctly and get everything running together.
Here's the test plugins and dependency versions I've got in the project which works (above). It uses Spek 1, Spek 2 & JUnit Jupiter:
// Plugin (buildscript)
classpath "de.mannodermaus.gradle.plugins:android-junit5:1.3.2.0"
...
// Test dependencies
// Spek 1
testImplementation "org.jetbrains.spek:spek-api:1.2.1"
testImplementation "org.jetbrains.spek:spek-junit-platform-engine:1.2.1"
testImplementation "org.jetbrains.spek:spek-subject-extension:1.2.1"
// Spek 2
testImplementation "org.spekframework.spek2:spek-dsl-jvm:2.0.0-rc.1"
testImplementation "org.spekframework.spek2:spek-runner-junit5:2.0.0-rc.1"
// JUnit Jupiter (JUnit 5)
testImplementation "org.junit.jupiter:junit-jupiter-api:5.3.2"
testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:5.3.2"
// Pact tests (JUnit 5)
testImplementation "au.com.dius:pact-jvm-consumer-junit5_2.12:3.6.1"
...
Project is using Kotlin 1.3.20 as well.
Hi Spek Framework team,
Our team is currently in the process of migrating an Android app from Spek 1 to Spek 2. It's a large codebase, so migration effort will be considerable (magnitude of months).
Android Studio 3.3.0 has been officially released earlier in the week and we've noticed an incompatibility with it and v0.5.5-studio-3.0 of the Spek plugin. We're holding off on full migration of our test codebase until Spek 2 matures out of RC.
Android Studio 3.3.0 throws the following exception when the plugin initialises:
Ideally, we'd like to upgrade to the Android Studio 3.3.0 but running tests from the IDE is a blocker. No issues to report with Spek Framework plugin and the tests already ported over to Spek 2.
Is it possible to get a bug fix for the Spek plugin so it works with Android Studio 3.3.0?