Nightwatch integration with Maven - maven

is it possible to include running tests with Nightwatch as part of a Maven build for Java applications? Currently my app completes the build and deploy and then a separate script is fired to run the Nightwatch tests. It would be a big win to wrap the multiple steps up into a single one.

I am using frontend-maven-plugin to run npm commands from maven.

Related

How to run quakusIntTest against a running application using gradle?

The testing guide states that you can run integration tests using against a running app using:
./mvnw verify -Dquarkus.http.test-host=1.2.3.4 -Dquarkus.http.test-port=4321
I am trying to the the same thing, but using gradle:
./gradlew quarkusIntTest -Dquarkus.http.test-host=1.2.3.4 -Dquarkus.http.test-port=4321
However it did not worked.

Maven how to show Junit test like on Eclipse IDE

I would like to run Junit tests via maven command like having the test result
with the same graphical message that I can see using Eclipse IDE.
For example, if I run Junit test via Eclipse I can see this tree image:
But, if I run the same tests via maven command line, I can see only the grand total result without details.
For example:
There is a way to run maven command line tests and receive the test result like Eclipse IDE?
I use surefire plugin on my project.
Thanks in advance.

Running selenium unit tests with Spring Boot

I have some integration tests that use Selenium and the HtmlUnitDriver to verify my web app behaves correctly from the browser. In IntelliJ, I'm able to run ./gradlew bootRun to start my embedded web server, and then run my Selenium tests manually.
The tests run as expected.
However, I'm wondering what the best strategy is to run these in an automated fashion on my CI Server (TeamCity in this case). Simply running bootRun doesn't quite work since the task runs until it gets terminated.
Should I create a script that runs bootRun, and then I can terminate gradle somehow after the tests complete? I'd also like to use my application.properties file I have in src/test/resources instead of src/main/resources which bootRun uses normally.

Running integration tests remotely with maven

How can I run integration tests on an environment other than the one I'm building (running maven) from? I suppose I should use the failsafe plugin, but how would it find the artifact remotely, run the tests and return results?
Specifically: I want to run my tests on a controlled environment, a docker container, regardless of building from the build server or a dev machine.

how to execute all the invoke top level maven target in jenkins and execute remaining build steps only if maven target are successful

I have a Continuous integration setup using jenkins. I need to run Junit test cases and selenium test cases and commit the jar files in svn, only if all the junit and selenium scripts are passed.
Junit and selenium test cases are separate maven projects so i have used two invoke top level maven targets (One for selenium and other for Junit). I came across following issues,
Selenium scripts will be executed first and if any of the selenium test cases are failed, the jenkins build is marked as Failed and it will start to execute the post-build actions skipping all the build steps including junit. I want to run the Junit test cases also even if selenium scripts are failed. So i have added -Dmaven.test.failure.ignore=true in maven goals to execute the junit test cases even if selenium scripts are failed. This worked perfectly as i expected and continued to execute junit test caes and the build is marked as UNSTABLE.
Now i got another issue, i have a build step to invoke ant at the end (To commit jars in svn only if selenium and junit are passed). After adding -Dmaven.test.failure.ignore=true, the jars are getting commited to svn even if there is any failures.
Can anyone help me to solve this problem?
The build should run both Selenium and Junit, even if there is any failure in any one of project.
Jars should be committed in svn only if everything is successful (This is done by using ant target, so i have placed invoke ant at the end in Build step.
Is there any other way to accomplish this ? Thanks in advance.

Resources