-
Notifications
You must be signed in to change notification settings - Fork 47
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add basic UI test that creates new Quarkus project and builds it using maven #234
Conversation
Great work. However, it uses a separate sub project which would make it more difficult to write new tests.
|
|
||
import static com.intellij.remoterobot.stepsProcessing.StepWorkerKt.step; | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There should be also author and also short description what it does.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have added author and comments to every Java file.
gui-tests/run_the_tests.sh
Outdated
@@ -0,0 +1,16 @@ | |||
#! /bin/bash |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add also short description, what it does.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is no need for adding a description after all, because the script has been deleted (it was just a temporary script until the gradle issue is resolved).
9bee9fc
to
d06d6e3
Compare
…g maven. Fixes: 216 Signed-off-by: Zbynek Cervinka <zcervink@redhat.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also the main workflow (CI.yml) should also be updated to run integration tests
build.gradle
Outdated
@@ -80,6 +106,10 @@ dependencies { | |||
compile 'org.eclipse.lsp4mp:org.eclipse.lsp4mp.ls:0.1.0' | |||
compile 'org.eclipse.lsp4j:org.eclipse.lsp4j:0.8.1' | |||
compile 'com.vladsch.flexmark:flexmark:0.50.50' | |||
testImplementation("com.intellij.remoterobot:remote-robot:$remoteRobotVersion") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should be integrationTestImplementation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
changed
build.gradle
Outdated
@@ -110,5 +144,27 @@ jacocoTestReport { | |||
|
|||
check.dependsOn jacocoTestReport | |||
|
|||
subprojects { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be removed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
removed
|
||
public static void waitUntilTheProjectImportIsComplete(RemoteRobot remoteRobot) { | ||
step("Wait until the project import is complete", () -> { | ||
while (true) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is a built-in method for conditional waits in com.intellij.remoterobot.utils.RepeatUtilsKt
called waitFor
. Please use that instead of endless loops.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jrichter1 Thank you very much for this advice. The infinite while loops have been replace with the waitFor() method.
I tested it on my Win10Pro laptop and it failed from me:
Here is the log:
|
Signed-off-by: Zbynek Cervinka <zcervink@redhat.com>
build.gradle
Outdated
id "com.adarshr.test-logger" version "1.7.0" | ||
id 'org.jetbrains.kotlin.jvm' version '1.3.71' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be removed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
removed
b04eea1
to
672e51d
Compare
build.gradle
Outdated
useJUnitPlatform() | ||
} | ||
|
||
wrapper { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Last question: what is the rationale for this ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed. I have copied it from other gradle configuration, now I see it is not necessary.
Signed-off-by: Zbynek Cervinka <zcervink@redhat.com>
This sometimes happens because there is a delay before the IDE UI appears. We are working on this issue with Jan Richter, for now you need run the ./gradlew runIdeForUiTests command, wait until the UI appears and then run the ./gradlew integrationTest command. There is also an issue with the IDE version - the tests best run on the IC-2020.1 version, some older version has sometimes different UI and the build fails (#242). |
Signed-off-by: Zbynek Cervinka <zcervink@redhat.com>
Signed-off-by: Zbynek Cervinka <zcervink@redhat.com>
@jeffmaury All requested changes from you and from @jrichter1 have been made. Can you make final review/merge if possible? |
build.gradle
Outdated
integrationTestImplementation("com.intellij.remoterobot:remote-robot:$remoteRobotVersion") | ||
integrationTestImplementation("com.intellij.remoterobot:remote-fixtures:$fixturesVersion") | ||
integrationTestImplementation 'org.junit.jupiter:junit-jupiter-api:5.3.1' | ||
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.3.1' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should'n it be integrationTestRuntimeOnly ?
Signed-off-by: Zbynek Cervinka <zcervink@redhat.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Congrats. Major improvment
Fixes: #216
Signed-off-by: Zbynek Cervinka zcervink@redhat.com
Please review @odockal @jkopriva