Plain Java
You can use Java without plugins or frameworks.
Usage
Using plain java testing is not recommended (for scaleability reasons).
This API can be used to create a composition, or simply to create unsupported plugins.
Capabilities
-
Create a test
-
Add attachments (PDF, HTML reports) to the test
-
Add test tags
Simple Example
public class PlainJavaExample {
static {
System.setProperty("manager.url", "localhost:9011");
System.setProperty("manager.url", "<Cloud url>:<reverse proxy port>/reporter");// in case using Reporter that configure to a single port cloud
System.setProperty("manager.accesskey", "accesskey"); // in case using Reporter that configure to a cloud
}
public static void main(String[] args) {
ManagerPublisher managerPublisher = PManager.createManagerPublisher("test name");
managerPublisher.addProperty("key1", "value1");
managerPublisher.addProperty("test-version", "24");
managerPublisher.addReportFolder(new File("/path/to/file"));
// mark test as finished
managerPublisher.finishTest(true);
// since all network request is async
// call .waitForPublish() to wait for
// all the request to finish
managerPublisher.waitForPublish();
}
}