Skip to end of metadata
Go to start of metadata

Functional Testing with Cargo

This page explains how to do functional testing with the Cargo Java API and JUnit.

Are you using ANT or Maven2/Maven3?

Icon

If you are relying on ANT or Maven2/Maven3 for your build, it is probably easier for you to use the associated tasks/plugin directly:

  • The documentation for the CARGO ANT tasks can be found here: Ant support.
  • The documentation for the CARGO Maven2/Maven3 plugin can be found here: Maven2 plugin.

Note that the Maven2/Maven3 plugin also has archetypes you can directly use as a skeleton for integration.

 

Example

The best is to create a JUnit TestSetup extension so that you start and stop your container once for the whole test suite. For example:

Then write your test case. For example:

References

  • No labels