Closed Harikahema1 closed 4 years ago
@Harikahema1:
I will have a deeper look as soon as I have more time...
@aaschmid Thank you for the response.
Do you also have a unit test file which I can run to try reproducing your error? -> no Do you use the same command line arguments when running the tests from your IDE? -> No i haven't used command line arguments when running test from intellij IDE, I use to run from TestRunner.class
below is the screenshot of structure of my project:
@aaschmid
I tried to run scripts through the same command line arguments from intellij IDE and i got the same error:
" error: package com.google.gson does not exist"
"error: package com.core does not exist"
.....etc etc
So, would you aggree that it is somehow related to -Dcucumber.options="--tags @automated"
command line arg, right?
I am not sure. I even tried using simple maven command for running scripts "mvn test" followed by "mvn clean" , still i get the same error.
i just want to run all the tagged(@automated) test scenarios through maven command line.
Start looking deeper into the provided data, I haven't found a junit-dataprovider
dependency in your pom.xml
.
BTW: Do you know JGiven which provides you a more a developer-friendly and pragmatic BDD tool for Java using plain Java with a fluent, domain-specific API. This would support junit-dataprovider
out-of-the-box :-)
Some more hints which I found trying to create a simple reproducer:
5.6.0
junit
or testng
as both is on your classpath?
testng
and its dataprovider, with this one being a junit
version of it?Closed due to no further response. Please don't hesitate to reopen
Trying to execute automation scripts build on cucumber,java,junit through Maven command line
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">
I get below error: "C:/Work/UIAutomation/HTest/src/test/java/com/pages/SalesForce/DevicesForEachMeasurement.java: Some input files use unchecked or unsafe operations." "C:/Work/UIAutomation/HTest/src/test/java/com/pages/SalesForce/DevicesForEachMeasurement.java: Recompile with -Xlint:unchecked for details."
I executed below command for more details: "javac C:/Work/UIAutomation/HTest/src/test/java/com/pages/SalesForce/DevicesForEachMeasurement.java -Xlint:unchecked" and found that its not recoginizing any of my imports, below are details: "error: package com.google.gson does not exist" "package org.openqa.selenium does not exist" "error: cannot find symbol" class files also not getting recogized
Kindly help me in resolving this issue.