- Enable assertion cataloging and coverage instrumentation for your software.
- Start your JARs in a specific way.
Enable assertion cataloging
Assertion cataloging is required when using SDK assertions. Place directories, files, or symlinks to the code you want cataloged in the directory/opt/antithesis/catalog/ within your container image. Generally, this means any .jar and/or .war files.
Antithesis will recursively instrument and catalog all the code in this directory, including any JARs or WARs. Instrumentation and cataloging for separate .class files is not currently supported.
Antithesis will follow symlinks one level deep while resolving the path to the cataloging directory. Do not symlink to a symlink.
Enable coverage instrumentation
Antithesis can automatically instrument compiled Java code by means of bytecode weaving. No changes to your source code or build system are required. Instrumentation is enabled the same way as assertion cataloging, so if you enabled assertion cataloging, no additional steps are required. Just remember Antithesis will follow only one symlink deep into each item in/opt/antithesis/catalog/.
Example cataloging directory:
dotnet_file.dllpython_script.pymain.jar
my_other.jar- this will be ignored as we already encountered one symlink when traversing down fromopt/antithesis/catalog/more_files.
Antithesis will, by default, act upon every language it supports in the cataloging directory: (Java , Python, JavaScript, .NET), not just Java.
Enable symbolization
Antithesis automatically gathers the symbol information from your code. You don’t need to separately provide symbol files.Starting your JARs
When running assertion cataloging and instrumentation, Antithesis createa additional dependencies for the application, and inject the dependency JARs at the same path as the main application JAR, so you will need to add that folder to your classpath. For example, if you are starting the app in/opt/app/bin/sample_app.jar, then we will require /opt/app/bin/* to be on the classpath.
This means invoking your app JAR like: