Skip to content

tcases-api-test: What does it mean when "No package defined for target"? #188

Discussion options

You must be logged in to vote

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.

  1. Define the package directly

    • tcases-api-test -p org.examples ...
    • mvn tcases:api-test -DtestPackage=org.examples ...
  2. 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 ...
  3. Define an output directory that implicitly indicates the package according to Maven conventions

    • tcases-api-test -o tar…

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@AnirudhChaudhary
Comment options

@kerrykimbrough
Comment options

Answer selected by kerrykimbrough
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants