tcases-api-test: What does it mean when "No package defined for target"? #188
-
Hello, I am trying to work with the cases-api-test command and I am confused about the functionality of the commands and some corresponding tags. Attached below is a picture that is causing me confusion. When I copied the command structure from the documentation on GitHub, it works fine with the path called src/test/java/org/examples but I don't understand what this path means. When I change this path I get an error like the one that is seen below as well. I get this error when I omit the -o + path as well. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
The generated JUnit test class -- like any Java class -- must declare the package it belongs to. If no package is defined, Tcases reports a failure like the examples above. So how can you define the package for the generated test class? There are several ways to do that.
|
Beta Was this translation helpful? Give feedback.
The generated JUnit test class -- like any Java class -- must declare the package it belongs to. If no package is defined, Tcases reports a failure like the examples above.
So how can you define the package for the generated test class? There are several ways to do that.
Define the package directly
tcases-api-test -p org.examples ...
mvn tcases:api-test -DtestPackage=org.examples ...
Define the test class using a fully-qualified class name that includes the package
tcases-api-test -n org.examples.MyTest ...
mvn tcases:api-test -DtestName=org.examples.MyTest ...
Define an output directory that implicitly indicates the package according to Maven conventions
tcases-api-test -o tar…