how to execute parallel testing in cucumber - java

I need to execute two test cases using parallel testing in Cucumber.
What I have now is two test cases. One will open google.com and the other will open youtube.com. I've added certain dependencies in pom.xml and made some configs.
Also I've added the runner classes.
This is the google test case, runner class and feature file contents:
package com.cucumber.learning;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.firefox.FirefoxDriver;
import cucumber.api.java.en.Given;
public class GoogleTest {
public static WebDriver driver = new FirefoxDriver();
#Given("go to google")
public static void main() {
driver.get("https://www.google.co.in/?gfe_rd=cr&ei=iHJrV_DiJ8SL8QfEipjgBg");
}
}
google runner class
package com.cucumber.learning;
import org.junit.runner.RunWith;
import cucumber.api.CucumberOptions;
import cucumber.api.junit.Cucumber;
#RunWith(Cucumber.class)
#CucumberOptions(
features = "src/test/resources/com/cucumber/learning"
//,glue={"stepDefinition"}
)
public class GoogleRunnerIT {
}
google feature file: [feature file name: 1.google.feature]
#Google
Feature: Google test
Scenario: navigate to google
Given go to google
I've made similar to above code for youtube.com test case also.
the pom.xml code is as shown below:
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.bdd</groupId>
<artifactId>CucumberModule</artifactId>
<version>0.0.1-SNAPSHOT</version>
<url>http://maven.apache.org</url>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.11</version>
</dependency>
<dependency>
<groupId>info.cukes</groupId>
<artifactId>cucumber-junit</artifactId>
<version>1.1.7</version>
<type>jar</type>
</dependency>
<dependency>
<groupId>info.cukes</groupId>
<artifactId>cucumber-java</artifactId>
<version>1.1.7</version>
<type>jar</type>
</dependency>
<dependency>
<groupId>info.cukes</groupId>
<artifactId>gherkin</artifactId>
<version>2.12.1</version>
</dependency>
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-java</artifactId>
<version>2.53.0</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.7</source>
<target>1.7</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.18.1</version>
<dependencies>
<dependency>
<groupId>org.apache.maven.surefire</groupId>
<artifactId>surefire-junit47</artifactId>
<version>2.18.1</version>
</dependency>
</dependencies>
<executions>
<execution>
<id>acceptance-test</id>
<phase>integration-test</phase>
<goals>
<goal>test</goal>
</goals>
<configuration>
<includes>
<include>**/*RunnerIT.class</include>
</includes>
<parallel>all</parallel>
<threadCountSuites>2</threadCountSuites>
<useUnlimitedThreads>true</useUnlimitedThreads>
<testFailureIgnore>true</testFailureIgnore>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
When I execute the above project in Eclipse using "Run as 'Maven Test'", I receive the BUILD SUCCESS message but no browser is opening or the test case is executing.
Any help is greatly appreciated. Thanks in advance.
Console Error:
[INFO] Scanning for projects...
[WARNING]
[WARNING] Some problems were encountered while building the effective model for com.bdd:CucumberModule:jar:0.0.1-SNAPSHOT
[WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-compiler-plugin is missing. # line 39, column 12
[WARNING]
[WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.
[WARNING]
[WARNING] For this reason, future Maven versions might no longer support building such malformed projects.
[WARNING]
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building CucumberModule 0.0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) # CucumberModule ---
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] skip non existing resourceDirectory /home/test/workspace/customparalleltesting/src/main/resources
[INFO]
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) # CucumberModule ---
[INFO] No sources to compile
[INFO]
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) # CucumberModule ---
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] Copying 3 resources
[INFO]
[INFO] --- maven-compiler-plugin:3.1:testCompile (default-testCompile) # CucumberModule ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- maven-surefire-plugin:2.18.1:test (default-test) # CucumberModule ---
[INFO] Surefire report directory: /home/test/workspace/customparalleltesting/target/surefire-reports
[INFO] Using configured provider org.apache.maven.surefire.junitcore.JUnitCoreProvider
[INFO] parallel='none', perCoreThreadCount=true, threadCount=0, useUnlimitedThreads=false, threadCountSuites=0, threadCountClasses=0, threadCountMethods=0, parallelOptimized=true
-------------------------------------------------------
T E S T S
-------------------------------------------------------
Running com.cucumber.learning.YoutubeTest
Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.003 sec <<< FAILURE! - in com.cucumber.learning.YoutubeTest
initializationError(com.cucumber.learning.YoutubeTest) Time elapsed: 0.001 sec <<< ERROR!
cucumber.runtime.CucumberException:
Classes annotated with #RunWith(Cucumber.class) must not define any
Step Definition or Hook methods. Their sole purpose is to serve as
an entry point for JUnit. Step Definitions and Hooks should be defined
in their own classes. This allows them to be reused across features.
Offending class: class com.cucumber.learning.YoutubeTest
at cucumber.runtime.junit.Assertions.assertNoCucumberAnnotatedMethods(Assertions.java:13)
at cucumber.api.junit.Cucumber.<init>(Cucumber.java:55)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
at org.junit.internal.builders.AnnotatedBuilder.buildRunner(AnnotatedBuilder.java:29)
at org.junit.internal.builders.AnnotatedBuilder.runnerForClass(AnnotatedBuilder.java:21)
at org.junit.runners.model.RunnerBuilder.safeRunnerForClass(RunnerBuilder.java:59)
at org.junit.internal.builders.AllDefaultPossibilitiesBuilder.runnerForClass(AllDefaultPossibilitiesBuilder.java:26)
at org.junit.runner.Computer.getRunner(Computer.java:40)
at org.junit.runner.Computer$1.runnerForClass(Computer.java:31)
at org.junit.runners.model.RunnerBuilder.safeRunnerForClass(RunnerBuilder.java:59)
at org.junit.runners.model.RunnerBuilder.runners(RunnerBuilder.java:101)
at org.junit.runners.model.RunnerBuilder.runners(RunnerBuilder.java:87)
at org.junit.runners.Suite.<init>(Suite.java:80)
at org.junit.runner.Computer.getSuite(Computer.java:28)
at org.junit.runner.Request.classes(Request.java:75)
at org.apache.maven.surefire.junitcore.JUnitCoreWrapper.createRequestAndRun(JUnitCoreWrapper.java:97)
at org.apache.maven.surefire.junitcore.JUnitCoreWrapper.executeEager(JUnitCoreWrapper.java:78)
at org.apache.maven.surefire.junitcore.JUnitCoreWrapper.execute(JUnitCoreWrapper.java:54)
at org.apache.maven.surefire.junitcore.JUnitCoreProvider.invoke(JUnitCoreProvider.java:144)
at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:203)
at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:155)
at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:103)
Running com.cucumber.learning.GoogleTest
Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0 sec <<< FAILURE! - in com.cucumber.learning.GoogleTest
initializationError(com.cucumber.learning.GoogleTest) Time elapsed: 0 sec <<< ERROR!
cucumber.runtime.CucumberException:
Classes annotated with #RunWith(Cucumber.class) must not define any
Step Definition or Hook methods. Their sole purpose is to serve as
an entry point for JUnit. Step Definitions and Hooks should be defined
in their own classes. This allows them to be reused across features.
Offending class: class com.cucumber.learning.GoogleTest
at cucumber.runtime.junit.Assertions.assertNoCucumberAnnotatedMethods(Assertions.java:13)
at cucumber.api.junit.Cucumber.<init>(Cucumber.java:55)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
at org.junit.internal.builders.AnnotatedBuilder.buildRunner(AnnotatedBuilder.java:29)
at org.junit.internal.builders.AnnotatedBuilder.runnerForClass(AnnotatedBuilder.java:21)
at org.junit.runners.model.RunnerBuilder.safeRunnerForClass(RunnerBuilder.java:59)
at org.junit.internal.builders.AllDefaultPossibilitiesBuilder.runnerForClass(AllDefaultPossibilitiesBuilder.java:26)
at org.junit.runner.Computer.getRunner(Computer.java:40)
at org.junit.runner.Computer$1.runnerForClass(Computer.java:31)
at org.junit.runners.model.RunnerBuilder.safeRunnerForClass(RunnerBuilder.java:59)
at org.junit.runners.model.RunnerBuilder.runners(RunnerBuilder.java:101)
at org.junit.runners.model.RunnerBuilder.runners(RunnerBuilder.java:87)
at org.junit.runners.Suite.<init>(Suite.java:80)
at org.junit.runner.Computer.getSuite(Computer.java:28)
at org.junit.runner.Request.classes(Request.java:75)
at org.apache.maven.surefire.junitcore.JUnitCoreWrapper.createRequestAndRun(JUnitCoreWrapper.java:97)
at org.apache.maven.surefire.junitcore.JUnitCoreWrapper.executeEager(JUnitCoreWrapper.java:78)
at org.apache.maven.surefire.junitcore.JUnitCoreWrapper.execute(JUnitCoreWrapper.java:54)
at org.apache.maven.surefire.junitcore.JUnitCoreProvider.invoke(JUnitCoreProvider.java:144)
at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:203)
at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:155)
at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:103)
Results :
Tests in error:
GoogleTest.initializationError » Cucumber
Classes annotated with #RunWith(Cu...
YoutubeTest.initializationError » Cucumber
Classes annotated with #RunWith(C...
Tests run: 2, Failures: 0, Errors: 2, Skipped: 0
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2.375 s
[INFO] Finished at: 2016-06-23T16:21:53+05:30
[INFO] Final Memory: 10M/218M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.18.1:test (default-test) on project CucumberModule: There are test failures.
[ERROR]
[ERROR] Please refer to /home/test/workspace/customparalleltesting/target/surefire-reports for the individual test results.
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException

There are many things which are not correct in your setup, you have to instantiate the browser from cucumber runner class so that all your step definitions can run in that instance any how if you want to run it separately, you have to do something like this :
package com.cucumber.learning;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.firefox.FirefoxDriver;
import cucumber.api.java.en.Given;
public class GoogleTest extends GoogleRunnerIT {
#Given("go to google")
public static void main() {
public static WebDriver driver = new FirefoxDriver();
driver.get("https://www.google.co.in/?gfe_rd=cr&ei=iHJrV_DiJ8SL8QfEipjgBg");
}
}
But efficient way is create a common method in runner class for instantiating and passing the url of your app.!

Try to put forkCount in the configuration tag of the maven-surefire plugin
With forkCount=4 as in below example it will run 4 Test Classes in parallel which ends with RunnerIT
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.18.1</version>
<dependencies>
<dependency>
<groupId>org.apache.maven.surefire</groupId>
<artifactId>surefire-junit47</artifactId>
<version>2.18.1</version>
</dependency>
</dependencies>
<executions>
<execution>
<id>acceptance-test</id>
<phase>integration-test</phase>
<goals>
<goal>test</goal>
</goals>
<configuration>
<includes>
<include>**/*RunnerIT.class</include>
</includes>
<forkCount>4</forkCount>
<parallel>all</parallel>
<threadCountSuites>2</threadCountSuites>
<useUnlimitedThreads>true</useUnlimitedThreads>
<testFailureIgnore>true</testFailureIgnore>
</configuration>
</execution>
</executions>
</plugin>
Reference From :-
https://opencredo.com/running-cucumber-jvm-tests-in-parallel/

Can you change the signature and annotation for the method to be executed in step definition class
#Given("^go to google$")
public void goToGoogle() {
driver.get("https://www.google.co.in/gfe_rd=cr&ei=iHJrV_DiJ8SL8QfEipjgBg");
}
I am having doubt with the step definition being defined in main method.

Related

Getting error while rerun of failed scenarios in cucumber

I was trying to rerun the failed scenarios in cucumber, for this I had designed two runner files, one is the actual runner file which has path of feature files along with rerun plugin which specifies path of rerun.txt file and the other runner file which has path of rerun file as feature to be run, So after running both the runner files for the failed scenarios I am getting this error :-
WARNING: No features found at file:/Users/keshavmac/IdeaProjects/com.CucumberHybrid/target/Reports/rerun.txt
Please help me to resolve this error and automatically run the failed scenarios of rerun.txt file.
The actual runner class file is as below:-
package com.framework.runners;
import io.cucumber.testng.AbstractTestNGCucumberTests;
import io.cucumber.testng.CucumberOptions;
import org.testng.annotations.Test;
#CucumberOptions(features = "src/test/java/com/framework/features",glue = {"com/framework/utils" ,"com/framework/stepDef"},
tags = "#run",
plugin = {
"pretty","json:target/Reports/JsonReport/report.json","junit:target/Reports/Junitreports/report.xml","html:target/Reports/HTMLReport",
"rerun:target/Reports/rerun.txt"
},monochrome=true)
#Test
public class TestRunner extends AbstractTestNGCucumberTests {
}
The rerunner class file is as below:-
package com.framework.runners;
import io.cucumber.testng.AbstractTestNGCucumberTests;
import io.cucumber.testng.CucumberOptions;
import org.testng.annotations.Test;
#CucumberOptions(features = "target/Reports/rerun.txt",glue = {"com/framework/utils" ,"com/framework/stepDef"},
plugin = {
"pretty","json:target/FailedReports/JsonReport/report.json","junit:target/FailedReports/Junitreports/report.xml",
"html:target/FailedReports/HTMLReport"},
monochrome=true)
#Test
public class ReRunTestRunner extends AbstractTestNGCucumberTests {
}
The pom.xml configuration is :-
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<groupId>org.example</groupId>
<artifactId>com.CucumberHybrid</artifactId>
<version>1.0-SNAPSHOT</version>
<dependencies>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-core</artifactId>
<version>2.13.3</version>
</dependency>
<dependency>
<groupId>io.github.bonigarcia</groupId>
<artifactId>webdrivermanager</artifactId>
<version>3.8.1</version>
</dependency>
<dependency>
<groupId>org.testng</groupId>
<artifactId>testng</artifactId>
<version>6.14.3</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.cucumber</groupId>
<artifactId>cucumber-java</artifactId>
<version>6.1.2</version>
</dependency>
<dependency>
<groupId>net.masterthought</groupId>
<artifactId>cucumber-reporting</artifactId>
<version>5.3.0</version>
</dependency>
<dependency>
<groupId>io.cucumber</groupId>
<artifactId>cucumber-testng</artifactId>
<version>6.1.2</version>
</dependency>
<dependency>
<groupId>com.github.mkolisnyk</groupId>
<artifactId>cucumber-runner</artifactId>
<version>1.3.5</version>
</dependency>
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-java</artifactId>
<version>3.141.59</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>net.masterthought</groupId>
<artifactId>maven-cucumber-reporting</artifactId>
<version>3.16.0</version>
<executions>
<execution>
<id>execution</id>
<phase>test</phase>
<goals>
<goal>generate</goal>
</goals>
<configuration>
<projectName>Cucumber Framework Execution Report</projectName>
<outputDirectory>${project.build.directory}/Reports/cucumber-reports</outputDirectory>
<cucumberOutput>${project.build.directory}/Reports/JsonReport/report.json</cucumberOutput>
<buildNumber>42</buildNumber>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.0.0-M5</version>
<executions>
<execution>
<id>testngtest</id>
<phase>test</phase>
</execution>
</executions>
<configuration>
<!-- <systemPropertyVariables> <IsGridSetup>${is.grid}</IsGridSetup>
<HubUrl>${hub.url}</HubUrl> <FeatureName>${feature.name}</FeatureName> <TagName>${tag.name}</TagName>
<BrowserType>${browser.type}</BrowserType> </systemPropertyVariables> -->
<forkCount>3</forkCount> <!-- how many parallel vm get created and execute -->
<reuseForks>false</reuseForks><!-- Every it will create a new vm for
the execution and will not use any existing -->
<testFailureIgnore>true</testFailureIgnore><!-- The execution will continue
even if there is a test failure -->
<includes> <!-- Specify the file name -->
<include>**/*TestRunner.java</include><!-- This will include all the file
which has "Runner" as suffix in their name -->
</includes>
<suiteXmlFiles>
<!-- <suiteXmlFile>${testngxml.location}/testng.xml</suiteXmlFile> -->
</suiteXmlFiles>
</configuration>
</plugin>
</plugins>
</build>
</project>
The console logs are as below:-
[INFO]
[INFO] -------------------< org.example:com.CucumberHybrid >-------------------
[INFO] Building com.CucumberHybrid 1.0-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) # com.CucumberHybrid ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 2 resources
[INFO]
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) # com.CucumberHybrid ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) # com.CucumberHybrid ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /Users/keshavmac/IdeaProjects/com.CucumberHybrid/src/test/resources
[INFO]
[INFO] --- maven-compiler-plugin:3.1:testCompile (default-testCompile) # com.CucumberHybrid ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 15 source files to /Users/keshavmac/IdeaProjects/com.CucumberHybrid/target/test-classes
[INFO]
[INFO] --- maven-surefire-plugin:3.0.0-M5:test (default-test) # com.CucumberHybrid ---
[INFO]
[INFO] -------------------------------------------------------
[INFO] T E S T S
[INFO] -------------------------------------------------------
[INFO] Running com.framework.runners.TestRunner
[INFO] Running com.framework.runners.ReRunTestRunner
Aug 10, 2020 4:37:17 PM io.cucumber.core.runtime.FeaturePathFeatureSupplier get
WARNING: No features found at file:/Users/keshavmac/IdeaProjects/com.CucumberHybrid/target/Reports/rerun.txt
[INFO] Tests run: 0, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.851 s - in com.framework.runners.ReRunTestRunner
#run
Scenario: To test search functionality with blank submit # src/test/java/com/framework/features/Home.feature:7
[INFO ] 2020-08-10 16:37:18.331 [main] BaseSetup - New Webdriver instance invoked
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
Starting ChromeDriver 84.0.4147.30 (48b3e868b4cc0aa7e8149519690b6f6949e110a8-refs/branch-heads/4147#{#310}) on port 8150
Only local connections are allowed.
Please see https://chromedriver.chromium.org/security-considerations for suggestions on keeping ChromeDriver safe.
ChromeDriver was started successfully.
Aug 10, 2020 4:37:20 PM org.openqa.selenium.remote.ProtocolHandshake createSession
INFO: Detected dialect: W3C
[INFO ] 2020-08-10 16:37:20.357 [main] BaseSetup - Chrome browser instance launched successfully
When user opens browser and navigates to test url # com.framework.stepDef.Common_stepDef.user_opens_browser_and_navigates_to_test_url()
The page title verified is My Store
[DEBUG] 2020-08-10 16:37:28.123 [main] HomePage_PF - Banner on homepage of website has been validated.
Given user should be on home page # com.framework.stepDef.Home_stepDef.user_should_be_on_home_page()
[DEBUG] 2020-08-10 16:37:28.159 [main] HomePage_PF - Search field on homepage has been validated.
And search textfield should be visible # com.framework.stepDef.Home_stepDef.search_textfield_should_be_visible()
[DEBUG] 2020-08-10 16:37:30.526 [main] HomePage_PF - Search icon has been clicked.
When user clicks on search button # com.framework.stepDef.Home_stepDef.user_clicks_on_search_button()
java.lang.AssertionError: expected [true] but found [false]
at org.testng.Assert.fail(Assert.java:96)
at org.testng.Assert.failNotEquals(Assert.java:776)
at org.testng.Assert.assertTrue(Assert.java:44)
at org.testng.Assert.assertTrue(Assert.java:54)
at com.framework.stepDef.Home_stepDef.user_clicks_on_search_button(Home_stepDef.java:32)
at ���.user clicks on search button(file:///Users/keshavmac/IdeaProjects/com.CucumberHybrid/src/test/java/com/framework/features/Home.feature:10)
Then user should be displayed validation message "Please enter a search keyword" # com.framework.stepDef.ProductList_stepDef.user_should_be_displayed_validation_message(java.lang.String)
Scenario To test search functionality with blank submit has been failed
Embedding To test search functionality with blank submit [image/png 365303 bytes]
[INFO ] 2020-08-10 16:37:31.638 [main] HomePage_PF - Webdriver instance has been closed
[ERROR] Tests run: 1, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 14.975 s <<< FAILURE! - in com.framework.runners.TestRunner
[ERROR] com.framework.runners.TestRunner.runScenario["To test search functionality with blank submit", "Optional[To test the Search feature of application]"](1) Time elapsed: 13.995 s <<< FAILURE!
java.lang.AssertionError: expected [true] but found [false]
[INFO]
[INFO] Results:
[INFO]
[ERROR] Failures:
[ERROR] TestRunner.runScenario expected [true] but found [false]
[INFO]
[ERROR] Tests run: 1, Failures: 1, Errors: 0, Skipped: 0
[INFO]
[ERROR] There are test failures.
Please refer to /Users/keshavmac/IdeaProjects/com.CucumberHybrid/target/surefire-reports for the individual test results.
Please refer to dump files (if any exist) [date].dump, [date]-jvmRun[N].dump and [date].dumpstream.
[INFO]
[INFO] --- maven-cucumber-reporting:3.16.0:generate (execution) # com.CucumberHybrid ---
[INFO] About to generate Cucumber report.
[INFO] File '/Users/keshavmac/IdeaProjects/com.CucumberHybrid/target/Reports/JsonReport/report.json' contain 1 features
I think you are just missing annotation # and hence no feature is found. Try this -
features = "#target/Reports/rerun.txt"
After discussion in comment section
Rename ReRunTestRunner to start with any letter after "T" (TestRunner, original feature file), as Cucumber picks up feature file in alphabetical order

Why maven cannot add my dependency to jar?

I'm new to maven and one simple thing I wanted to do is pull maven repository and use it in my project.
but this has happened.
pom.xml
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>ToolsQA</groupId>
<artifactId>jutil_table</artifactId>
<packaging>jar</packaging>
<version>1.0-SNAPSHOT</version>
<name>jutil_table</name>
<url>http://maven.apache.org</url>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.github.chrisgleissner</groupId>
<artifactId>jutil-protobuf</artifactId>
<version>1.1.11</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.5.1</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
</plugins>
</build>
</project>
App.java
package ToolsQA;
/**
* Hello world!
*
*/
import static com.github.chrisgleissner.jutil.table.TablePrinter.DefaultTablePrinter;
import static java.util.Arrays.asList;
public class App
{
public static void main( String[] args )
{
System.out.println( "Hello World!" );
Iterable<String> HEADERS = asList("id", "name", "age");
DefaultTablePrinter.print(HEADERS, null);
}
}
Complete Error message
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------< ToolsQA:jutil_table >-------------------------
[INFO] Building jutil_table 1.0-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) # jutil_table ---
[INFO] Deleting C:\Users\Pawar\Desktop\mvn_tutorial\jutil_table\jutil_table\target
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) # jutil_table ---
[WARNING] Using platform encoding (Cp1252 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] skip non existing resourceDirectory C:\Users\Pawar\Desktop\mvn_tutorial\jutil_table\jutil_table\src\main\resources
[INFO]
[INFO] --- maven-compiler-plugin:3.5.1:compile (default-compile) # jutil_table ---
[INFO] Changes detected - recompiling the module!
[WARNING] File encoding has not been set, using platform encoding Cp1252, i.e. build is platform dependent!
[INFO] Compiling 1 source file to C:\Users\Pawar\Desktop\mvn_tutorial\jutil_table\jutil_table\target\classes
[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] /C:/Users/Pawar/Desktop/mvn_tutorial/jutil_table/jutil_table/src/main/java/ToolsQA/App.java:[8,53] package com.github.chrisgleissner.jutil.table does not exist
[ERROR] /C:/Users/Pawar/Desktop/mvn_tutorial/jutil_table/jutil_table/src/main/java/ToolsQA/App.java:[8,2] static import only from classes and interfaces
[ERROR] /C:/Users/Pawar/Desktop/mvn_tutorial/jutil_table/jutil_table/src/main/java/ToolsQA/App.java:[18,10] cannot find symbol
symbol: variable DefaultTablePrinter
location: class ToolsQA.App
[INFO] 3 errors
[INFO] -------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 4.037 s
[INFO] Finished at: 2020-05-24T22:49:15+05:30
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.5.1:compile (default-compile) on project jutil_table: Compilation failure: Compilation failure:
[ERROR] /C:/Users/Pawar/Desktop/mvn_tutorial/jutil_table/jutil_table/src/main/java/ToolsQA/App.java:[8,53] package com.github.chrisgleissner.jutil.table does not exist
[ERROR] /C:/Users/Pawar/Desktop/mvn_tutorial/jutil_table/jutil_table/src/main/java/ToolsQA/App.java:[8,2] static import only from classes and interfaces
[ERROR] /C:/Users/Pawar/Desktop/mvn_tutorial/jutil_table/jutil_table/src/main/java/ToolsQA/App.java:[18,10] cannot find symbol
[ERROR] symbol: variable DefaultTablePrinter
[ERROR] location: class ToolsQA.App
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
I read lot of articles and lot of related questions on stackoverflow about this. but still maven is unable to download the repo. and build is failing.
I used mvn compile, mvn package, mvn clean install nothing worked for me.
Please help✌️
As per the documentation, you need to have all three dependencies. That issue you have posted is not directly relevant to maven. That says the compiler cannot find symbols, may be because the class is not there in the classpath. Try with all the dependencies included.
Or in this case, what you really need the dependency for jutil-table only. You can omit the other two. But your maven pom contain jutil-protobuf dependency.
<dependency>
<groupId>com.github.chrisgleissner</groupId>
<artifactId>jutil-protobuf</artifactId>
<version>1.1.11</version>
</dependency>
<dependency>
<groupId>com.github.chrisgleissner</groupId>
<artifactId>jutil-sql-log</artifactId>
<version>1.1.11</version>
</dependency>
<dependency>
<groupId>com.github.chrisgleissner</groupId>
<artifactId>jutil-table</artifactId>
<version>1.1.11</version>
</dependency>
And build the jar including the dependencies using maven assembly plugin
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
</execution>
</executions>
<configuration>
<archive>
<manifest>
<mainClass> // Main class Ex : com.Test </mainClass>
</manifest>
</archive>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
</configuration>
</plugin>

Unable to run testNG tests from maven

I have a project that uses testng APIs to dynamically create testng.xml file, so using the main function of java my project works as expected, but if I run my project via maven using 'Run as->maven build' It looks like only the BeforeSuite and BeforeTest classes are running, but the actual tests aren't running. Here's my pom.xml file:
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.22.1</version>
<dependencies>
<dependency>
<groupId>org.apache.maven.surefire</groupId>
<artifactId>surefire-testng</artifactId>
<version>2.22.1</version>
</dependency>
</dependencies>
<configuration>
<forkMode>never</forkMode>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.0</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>1.2.1</version>
<executions>
<execution>
<goals>
<goal>java</goal>
</goals>
</execution>
</executions>
<configuration>
<mainClass>main.MainRunner</mainClass>
<arguments>
</arguments>
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.testng</groupId>
<artifactId>testng</artifactId>
<version>6.14.3</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-java</artifactId>
<version>3.14.0</version>
</dependency>
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi</artifactId>
<version>4.0.0</version>
</dependency>
<dependency>
<groupId>com.relevantcodes</groupId>
<artifactId>extentreports</artifactId>
<version>2.41.2</version>
</dependency>
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi-ooxml-schemas</artifactId>
<version>4.0.0</version>
</dependency>
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi-ooxml</artifactId>
<version>4.0.0</version>
</dependency>
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>2.6</version>
</dependency>
</dependencies>
Here's my MainRunner.java class:
package main;
import java.io.IOException;
import org.testng.TestNG;
import framework.CreateXml;
public class MainRunner {
public static void main(String[] args) throws IOException {
// TODO Auto-generated method stub
TestNG testng= new TestNG();
CreateXml createAndRun = new CreateXml(testng);
createAndRun.createAndRun();
}
}
This MainRunner class calls the 'createAndRun()' function that creates the testng.xml suite and runs the tests like this:
testng.setXmlSuites(mySuites);
testng.setListenerClasses(listenerClasses);
testng.setVerbose(3);
testng.run();
And finally, here's the stacktrace:
[INFO] --- maven-surefire-plugin:2.22.1:test (default-test) # Automata ---
[WARNING] The parameter forkMode is deprecated since version 2.14. Use forkCount and reuseForks instead.
[WARNING] useSystemClassloader setting has no effect when not forking
[INFO] Surefire report directory: D:\Git\automata\Automata\target\surefire-reports
[INFO] Using configured provider org.apache.maven.surefire.testng.TestNGProvider
[INFO] Running TestSuite
Configuring TestNG with: TestNG60Configurator
Surefire suite started.....
In Before Test
Starting ChromeDriver 2.44.609538 (b655c5a60b0b544917107a59d4153d4bf78e1b90) on port 45113
Only local connections are allowed.
Dec 20, 2018 11:57:27 PM org.openqa.selenium.remote.ProtocolHandshake createSession
INFO: Detected dialect: OSS
new instance
Surefire suite ended.....
[INFO] Tests run: 0, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 8.472 s - in TestSuite
[INFO]
[INFO] Results:
[INFO]
[INFO] Tests run: 0, Failures: 0, Errors: 0, Skipped: 0
[INFO]
[INFO]
[INFO] --- maven-jar-plugin:2.4:jar (default-jar) # Automata ---
[INFO]
[INFO] --- maven-install-plugin:2.4:install (default-install) # Automata ---
[INFO] Installing D:\Git\automata\Automata\target\Automata-0.0.1-SNAPSHOT.jar to C:\Users\A\.m2\repository\com\sanrotech\com\Automata\0.0.1-SNAPSHOT\Automata-0.0.1-SNAPSHOT.jar
[INFO] Installing D:\Git\automata\Automata\pom.xml to C:\Users\A\.m2\repository\com\sanrotech\com\Automata\0.0.1-SNAPSHOT\Automata-0.0.1-SNAPSHOT.pom
[INFO]
[INFO] >>> exec-maven-plugin:1.2.1:java (default-cli) > validate # Automata >>>
[INFO]
[INFO] <<< exec-maven-plugin:1.2.1:java (default-cli) < validate # Automata <<<
[INFO]
[INFO]
[INFO] --- exec-maven-plugin:1.2.1:java (default-cli) # Automata ---
[WARNING]
java.lang.ClassNotFoundException: main.MainRunner
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at org.codehaus.mojo.exec.ExecJavaMojo$1.run(ExecJavaMojo.java:285)
at java.lang.Thread.run(Thread.java:748)
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 12.582 s
[INFO] Finished at: 2018-12-20T23:57:30+05:30
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.2.1:java (default-cli) on project Automata: An exception occured while executing the Java class. main.MainRunner -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.2.1:java (default-cli) on project Automata: An exception occured while executing the Java class. main.MainRunner
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:213)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:154)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:146)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:117)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:81)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:56)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:305)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:192)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:105)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:956)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:290)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:194)
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.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
Caused by: org.apache.maven.plugin.MojoExecutionException: An exception occured while executing the Java class. main.MainRunner
at org.codehaus.mojo.exec.ExecJavaMojo.execute(ExecJavaMojo.java:352)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:137)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
... 20 more
Caused by: java.lang.ClassNotFoundException: main.MainRunner
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at org.codehaus.mojo.exec.ExecJavaMojo$1.run(ExecJavaMojo.java:285)
at java.lang.Thread.run(Thread.java:748)
[ERROR]
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
I wonder what am I missing here.
Add this to your Pom.xml file,Where you have your the placed the testng source location src/main/java or src/test/java or src/test/resources
<configuration>
<suiteXmlFiles>
<suiteXmlFile>src/test/resources/testng.xml</suiteXmlFile>
</suiteXmlFiles>
</configuration>
Finally, I found a solution, I just had to add
<classpathScope>test</classpathScope>
to the configuration of the exec plugin and now it's working as expected.

Building Maven project with Junit

I made a project with RestAssured Maven. When I run it in eclipse(run as junit) it works but when I try to use mvn package or mvn test , gives me error. I want to build and run it in command line but I don't know how. I appreciate if anybody can help me with this.
[INFO] Error stacktraces are turned on.
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building ServerTester 0.0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) # ServerTester ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /home/alireza/Downloads/8803ASETeam4-master/ServerTester/src/main/resources
[INFO]
[INFO] --- maven-compiler-plugin:2.5.1:compile (default-compile) # ServerTester ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) # ServerTester ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /home/alireza/Downloads/8803ASETeam4-master/ServerTester/src/test/resources
[INFO]
[INFO] --- maven-compiler-plugin:2.5.1:testCompile (default-testCompile) # ServerTester ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- maven-surefire-plugin:2.18.1:test (default-test) # ServerTester ---
[INFO] Surefire report directory: /home/alireza/Downloads/8803ASETeam4-master/ServerTester/target/surefire-reports
-------------------------------------------------------
T E S T S
-------------------------------------------------------
Results :
Tests run: 0, Failures: 0, Errors: 0, Skipped: 0
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.671 s
[INFO] Finished at: 2017-04-23T22:47:00-04:00
[INFO] Final Memory: 13M/429M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.18.1:test (default-test) on project ServerTester: Execution default-test of goal org.apache.maven.plugins:maven-surefire-plugin:2.18.1:test failed: There was an error in the forked process
[ERROR] org.apache.maven.surefire.testset.TestSetFailedException: Suite file /home/alireza/Downloads/8803ASETeam4-master/ServerTester/testng.xml is not a valid file
[ERROR] at org.apache.maven.surefire.testng.TestNGXmlTestSuite.locateTestSets(TestNGXmlTestSuite.java:116)
[ERROR] at org.apache.maven.surefire.testng.TestNGProvider.invoke(TestNGProvider.java:83)
[ERROR] at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:203)
[ERROR] at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:155)
[ERROR] at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:103)
[ERROR] -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.18.1:test (default-test) on project ServerTester: Execution default-test of goal org.apache.maven.plugins:maven-surefire-plugin:2.18.1:test failed: There was an error in the forked process
org.apache.maven.surefire.testset.TestSetFailedException: Suite file /home/alireza/Downloads/8803ASETeam4-master/ServerTester/testng.xml is not a valid file
at org.apache.maven.surefire.testng.TestNGXmlTestSuite.locateTestSets(TestNGXmlTestSuite.java:116)
at org.apache.maven.surefire.testng.TestNGProvider.invoke(TestNGProvider.java:83)
at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:203)
at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:155)
at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:103)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:212)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:307)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:863)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:288)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:199)
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.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
Caused by: org.apache.maven.plugin.PluginExecutionException: Execution default-test of goal org.apache.maven.plugins:maven-surefire-plugin:2.18.1:test failed: There was an error in the forked process
org.apache.maven.surefire.testset.TestSetFailedException: Suite file /home/alireza/Downloads/8803ASETeam4-master/ServerTester/testng.xml is not a valid file
at org.apache.maven.surefire.testng.TestNGXmlTestSuite.locateTestSets(TestNGXmlTestSuite.java:116)
at org.apache.maven.surefire.testng.TestNGProvider.invoke(TestNGProvider.java:83)
at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:203)
at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:155)
at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:103)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:145)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:207)
... 20 more
Caused by: java.lang.RuntimeException: There was an error in the forked process
org.apache.maven.surefire.testset.TestSetFailedException: Suite file /home/alireza/Downloads/8803ASETeam4-master/ServerTester/testng.xml is not a valid file
at org.apache.maven.surefire.testng.TestNGXmlTestSuite.locateTestSets(TestNGXmlTestSuite.java:116)
at org.apache.maven.surefire.testng.TestNGProvider.invoke(TestNGProvider.java:83)
at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:203)
at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:155)
at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:103)
at org.apache.maven.plugin.surefire.booterclient.ForkStarter.fork(ForkStarter.java:509)
at org.apache.maven.plugin.surefire.booterclient.ForkStarter.fork(ForkStarter.java:380)
at org.apache.maven.plugin.surefire.booterclient.ForkStarter.run(ForkStarter.java:167)
at org.apache.maven.plugin.surefire.AbstractSurefireMojo.executeProvider(AbstractSurefireMojo.java:990)
at org.apache.maven.plugin.surefire.AbstractSurefireMojo.executeAfterPreconditionsChecked(AbstractSurefireMojo.java:824)
at org.apache.maven.plugin.surefire.AbstractSurefireMojo.execute(AbstractSurefireMojo.java:722)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
... 21 more
[ERROR]
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginExecutionException
My pom.xml is:
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>Team4</groupId>
<artifactId>ServerTester</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>jar</packaging>
<name>ServerTester</name>
<url>http://maven.apache.org</url>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<dependencies>
<!-- https://mvnrepository.com/artifact/org.testng/testng -->
<dependency>
<groupId>org.testng</groupId>
<artifactId>testng</artifactId>
<version>6.9.10</version>
</dependency>
<dependency>
<groupId>com.jayway.restassured</groupId>
<artifactId>rest-assured</artifactId>
<version>2.9.0</version>
</dependency>
<dependency>
<groupId>com.jayway.jsonpath</groupId>
<artifactId>json-path</artifactId>
<version>2.2.0</version>
</dependency>
<dependency>
<groupId>com.jayway.restassured</groupId>
<artifactId>json-schema-validator</artifactId>
<version>2.9.0</version>
</dependency>
<dependency>
<groupId>com.googlecode.json-simple</groupId>
<artifactId>json-simple</artifactId>
<version>1.1.1</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.18.1</version>
<configuration>
<suiteXmlFiles>
<suiteXmlFile>testng.xml</suiteXmlFile>
</suiteXmlFiles>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.5.1</version>
<configuration>
<source>1.7</source>
<target>1.7</target>
</configuration>
</plugin>
</plugins>
</build>
</project>
Also my project classes organization in project looks like this:
eclipse classes
I think the problem is that in your surefire plugin your are referencing a testng configuration file, but in your project your are using junit.
<configuration>
<suiteXmlFiles>
<suiteXmlFile>testng.xml</suiteXmlFile>
</suiteXmlFiles>
</configuration>
I don't use junit, but maybe take a look at the documentation for setting up surefire with junit.
The message from maven is pretty clear:
org.apache.maven.surefire.testset.TestSetFailedException: Suite file /home/alireza/Downloads/8803ASETeam4-master/ServerTester/testng.xml is not a valid file
And, as I don't see any testng.xml in your eclipse screenshot, I suppose it doesn't exist.
So, just remove the suiteXmlFiles from the surefire configuration and it should work.

Failure to Execute Goal Maven Surefire Plugin on Child Module for Jzy3d Program

To simplify what I'm asking: what is a test failure and how do I rectify it?
I'm new to Maven, and I'm trying to get the graphical plotting application Jzy3d to work on my computer. I've updated all of the plugins to be the newest versions in the POM files for the parent and child modules, as well as checking that Maven is pointing to the newest JRE I have installed (which it is).
My dependency trees are also all fine, which covers many of the avenues for which I have seen this error on this forum and elsewhere.
I simply cannot isolate the issue.
The error message when running mvn package -e is as follows:
D:\Program Files\jzy3d-api-master>mvn package -e
[INFO] Error stacktraces are turned on.
[INFO] Scanning for projects...
[INFO]
------------------------------------------------------------------------
[INFO] Reactor Build Order:
[INFO]
[INFO] Jzy3d Master Project
[INFO] JDT core (fork of https://github.com/yonatang/JDT)
[INFO] Jzy3d API
[INFO] Jzy3d SWT Tools
[INFO] Jzy3d Tutorials
[INFO]
[INFO]
------------------------------------------------------------------------
[INFO] Building Jzy3d Master Project 0.9.2-SNAPSHOT
[INFO]
------------------------------------------------------------------------
[INFO]
[INFO]
------------------------------------------------------------------------
[INFO] Building JDT core (fork of https://github.com/yonatang/JDT)
0.9.2-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) # jzy3d-jdt-core ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory D:\Program Files\jzy3d-api-master\jzy3d-jdt-core\src\main\resources
[INFO]
[INFO] --- maven-compiler-plugin:3.3:compile (default-compile) # jzy3d-jdt-core ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) # jzy3d-jdt-core ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 18 resources
[INFO]
[INFO] --- maven-compiler-plugin:3.3:testCompile (default-testCompile) # jzy3d-jdt-core ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- maven-surefire-plugin:2.19.1:test (default-test) # jzy3d-jdt-core ---
[INFO] Surefire report directory: D:\Program Files\jzy3d-api-master\jzy3d-jdt-core\target\surefire-reports
-------------------------------------------------------
T E S T S
-------------------------------------------------------
Running il.ac.idc.jdt.SmokeTest Configuring TestNG with: TestNG60Configurator Tests run: 1, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 2.639 sec <<< FAILURE! - in il.ac.idc.jdt.SmokeTest shouldRunOnExampleData(il.ac.idc.jdt.SmokeTest) Time elapsed: 0.412 sec <<< FAILURE! java.lang.AssertionError: t1_1000.tsin trangulation is correct for smf
at il.ac.idc.jdt.SmokeTest.shouldRunOnExampleData(SmokeTest.java:28)
Results :
Failed tests: SmokeTest.shouldRunOnExampleData:28 t1_1000.tsin trangulation is correct for smf
Tests run: 1, Failures: 1, Errors: 0, Skipped: 0
[INFO]
------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] Jzy3d Master Project ............................... SUCCESS [ 0.022 s]
[INFO] JDT core (fork of https://github.com/yonatang/JDT) . FAILURE [ 8.853 s]
[INFO] Jzy3d API .......................................... SKIPPED
[INFO] Jzy3d SWT Tools .................................... SKIPPED
[INFO] Jzy3d Tutorials .................................... SKIPPED
[INFO]
------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO]
------------------------------------------------------------------------
[INFO] Total time: 9.772 s
[INFO] Finished at: 2016-01-13T11:56:26+00:00
[INFO] Final Memory: 8M/22M
[INFO]
------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.19.1:test (default-test) on project jzy3d-jdt-core: There are test failures.
[ERROR]
[ERROR] Please refer to D:\Program Files\jzy3d-api-master\jzy3d-jdt-core\target\surefire-reports for the individual test results.
[ERROR] -> [Help 1] org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.19.1:test (default-test) on project jzy3d-jdt-core: There are test failures.
Please refer to D:\Program Files\jzy3d-api-master\jzy3d-jdt-core\target\surefire-reports for the individual test results.
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:212)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:307)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:863)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:288)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:199)
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:497)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356) Caused by: org.apache.maven.plugin.MojoFailureException: There are test failures.
Please refer to D:\Program Files\jzy3d-api-master\jzy3d-jdt-core\target\surefire-reports for the individual test results.
at org.apache.maven.plugin.surefire.SurefireHelper.reportExecution(SurefireHelper.java:91)
at org.apache.maven.plugin.surefire.SurefirePlugin.handleSummary(SurefirePlugin.java:320)
at org.apache.maven.plugin.surefire.AbstractSurefireMojo.executeAfterPreconditionsChecked(AbstractSurefireMojo.java:892)
at org.apache.maven.plugin.surefire.AbstractSurefireMojo.execute(AbstractSurefireMojo.java:755)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:207)
... 20 more [ERROR] [ERROR] Re-run Maven using the -X switch to enable full debug logging. [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException [ERROR] [ERROR] After correcting the problems, you can resume the build with the command [ERROR] mvn <goals> -rf :jzy3d-jdt-core
My parent POM file is:
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.jzy3d</groupId>
<artifactId>jzy3d-master</artifactId>
<version>0.9.2-SNAPSHOT</version>
<packaging>pom</packaging>
<name>Jzy3d Master Project</name>
<url>http://www.jzy3d.org</url>
<description>A java API to draw 3d charts.</description>
<developers>
<developer>
<id>martin.pernollet</id>
<name>Martin Pernollet</name>
<email>martin#jzy3d.org</email>
<url>http://twitter.com/jzy3d</url>
</developer>
<developer>
<id>nils.hoffmann</id>
<name>Nils Hoffmann</name>
</developer>
<developer>
<id>juan.barandiaran</id>
<name>Juan Barandiaran</name>
</developer>
</developers>
<licenses>
<license>
<name>The (New) BSD License</name>
<url>http://www.opensource.org/licenses/bsd-license.php</url>
<distribution>repo</distribution>
</license>
</licenses>
<scm>
<connection>scm:git:git://github.com/jzy3d/jzy3d-api</connection>
</scm>
<issueManagement>
<system>Github</system>
<url>https://github.com/jzy3d/jzy3d-api/issues</url>
</issueManagement>
<modules>
<module>jzy3d-api</module>
<!-- <module>jzy3d-javafx</module> -->
<module>jzy3d-swt</module>
<module>jzy3d-jdt-core</module>
<module>jzy3d-tutorials</module>
</modules>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<version.jzy3d>0.9.2-SNAPSHOT</version.jzy3d>
<version.java.source>1.6</version.java.source>
<version.java.target>1.6</version.java.target>
<version.mvn.compiler>3.0</version.mvn.compiler>
<version.mvn.ftp>1.0-beta-6</version.mvn.ftp>
<version.mvn.deploy>2.4</version.mvn.deploy>
<version.mvn.javadoc>2.9.1</version.mvn.javadoc>
<version.libs.junit>4.10</version.libs.junit>
<version.libs.swt>4.2.1</version.libs.swt>
</properties>
<distributionManagement>
<repository>
<id>jzy3d-ftp</id>
<name>Jzy3d Maven Folder</name>
<url>ftp://ftp.cluster013.ovh.net/maven/releases</url>
</repository>
<snapshotRepository>
<id>jzy3d-ftp</id>
<name>Jzy3d Maven Folder SNAPSHOTS</name>
<url>ftp://ftp.cluster013.ovh.net/maven/snapshots</url>
</snapshotRepository>
</distributionManagement>
<repositories>
<repository>
<id>jzy3d-snapshots</id>
<name>Jzy3d Snapshots</name>
<url>http://maven.jzy3d.org/snapshots</url>
</repository>
<repository>
<id>jzy3d-releases</id>
<name>Jzy3d Snapshots</name>
<url>http://maven.jzy3d.org/releases</url>
</repository>
</repositories>
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.3</version>
<configuration>
<source>1.5</source>
<target>1.5</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.10.3</version>
<configuration>
<stylesheetfile>jzy3d-api/doc/layout.css</stylesheetfile>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.19.1</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>2.10</version>
<executions>
<execution>
<id>copy</id>
<phase>package</phase>
<goals>
<goal>copy</goal>
</goals>
<configuration>
<artifactItems>
<artifactItem>
<groupId>[ groupId ]</groupId>
<artifactId>[ artifactId ]</artifactId>
<version>[ version ]</version>
<type>[ packaging ]</type>
<classifier> [classifier - optional] </classifier>
<overWrite>[ true or false ]</overWrite>
<outputDirectory>[ output directory ]</outputDirectory>
<destFileName>[ filename ]</destFileName>
</artifactItem>
</artifactItems>
<!-- other configurations here -->
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</pluginManagement>
<extensions>
<extension>
<groupId>org.apache.maven.wagon</groupId>
<artifactId>wagon-ftp</artifactId>
<version>${version.mvn.ftp}</version>
</extension>
</extensions>
</build>
</project>
And the child POM for which the error message keeps running (jzy3d-jdt-core) is:
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.jzy3d</groupId>
<artifactId>jzy3d-master</artifactId>
<version>0.9.2-SNAPSHOT</version>
</parent>
<artifactId>jzy3d-jdt-core</artifactId>
<name>JDT core (fork of https://github.com/yonatang/JDT)</name>
<description>Java Delaunay Triangulation Core Library</description>
<properties>
<testng.version>6.5.2</testng.version>
<hamcrest.version>1.3.RC2</hamcrest.version>
</properties>
<dependencies>
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>2.3</version>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>3.1</version>
</dependency>
To simplify what I'm asking: what is a test failure and how do I rectify it?
During the build of a Maven project, it executes automatically what are called unit tests. Those are Java classes whose purpose are to verify the behaviour of specific methods of the project. In this case, it turns out that one of the test is failing in your build.
Update 12 March 2016: the issue mentioned in this post was fixed!
There is indeed a problem with the tests of the jzy3d library when run on Windows. I checked out the master of their GitHub and I had the same error as you.
The reason is that, during the unit tests, the library is checking if the contents of two files are equal. However, one file is created with the line separator of the current OS, while the control file has Unix line separator.
If you take a look at the file jzy3d-jdt-core\src\test\resources\outputs\t1_1000.tsin_result.tsin, you will notice that it uses the Unix \n line separator. The shouldRunOnExampleData test that is failing is creating a temporary file to verify against that control file. On my Windows machine, this temporary file was created in C:\Users\{UserName}\AppData\Local\Temp\jdt-4971059362436436156.smf and, if opened, you can see that it uses Windows line separator \r\n. Hence, the two files are not equal and the test fails.
A possible solution, targeted at the developers of that library, is to use IOUtils.contentEqualsIgnoreEOL inside the test shouldRunOnExampleData, since this method does not check for the line endings when comparing two input streams. I created the issue 52 for this problem and submitted a pull request, that is now merged and closed.
A solution for you, user of the library, is either:
to change the line endings of each file inside jzy3d-jdt-core\src\test\resources\outputs with Windows line separator. If you are using Notepad++ to open the file, you can simply change the line-endings by going to "Edit > EOL Conversion > Windows format" and save the file.
to fix the code by using contentEqualsIgnoreEOL inside the class SmokeTest (the arguments then need to be wrapped with an InputStreamReader).
to skip the tests with mvn clean install -DskipTests=true.
In my case, I changed the code of the test to ignore the line endings. The rest of the build went fine.
A test failure is a negative outcome on an assertion made when a test is implemented. You basically get an unexpected result back from a called method or a field you are reading.
-> it is broken and it has to be fixed. That does not mean you have to fix is.
mvn package -Dmaven.test.skip=true
might help building the sources.
But instead of building the sources yourself, you could just download the binaries. These seem to be available on the web page as well.
When I run mvn package -e on fresh clones of either the master or the 0.9.1 branch of jzy3d, all tests pass and the maven build is successful.
From your output above, it's the shouldRunOnExampleData test in src/test/java/il/ac/idc/jdt/SmokeTest.java (in the jzy3d-jdt-core submodule) that is failing for you. Looking at the source code of that test, it's pretty clear that it was designed to run on some flavor of Unix, since it references hard coded paths "/inputs/" and "/outputs/".
Also from your output above, it's clear that you are running on some flavor Windows, so it's not terribly surprising that the test does not pass for you. If you want to make the test pass, you might change those to "\\inputs\\" and "\\outputs\\", respectively, or use the more flexible File.separator that should work for every OS.
If you don't care about the tests passing, and just want to build the jar files produced by mvn package -e, then you can instead run mvn package -e -DskipTests. (Setting -Dmaven.test.skip=true should also have worked; see the Maven documentation on skipping tests.)

Categories

Resources