Chapter 1. Test Domain

The test domain is a domain for all test tools, like Maven.

1.1. Description

The test domain runs all tests for a specific pre-configured project or suite of projects.

1.2. Functional Interface

The following listing presents the Java Domain Interface. This interface also contains information about events raised by this domain.

/**
 * This domain can be used to run tests for projects. The affected project is usually configured in the respective tool
 * connector.
 */
public interface TestDomain extends Domain {

    /**
     * run all tests for the currently configured project. This method returns at once with an id. The tests are run
     * asynchronously. The result can be retrieved using the events raised by this domain, which also contain the id.
     */
    @Raises({ TestStartEvent.class, TestSuccessEvent.class, TestFailEvent.class })
    String runTests();

    /**
     * run all tests for the currently configured project. This method returns at once with an id. The tests are run
     * asynchronously. The result can be retrieved using the events raised by this domain, with the processId set to the
     * supplied processId
     */
    @Raises({ TestStartEvent.class, TestSuccessEvent.class, TestFailEvent.class })
    void runTests(long processId);
}

1.3. Event Interface

The following interface presents the events an appointment connector can throw:

public interface TestDomainEvents extends DomainEvents {

    void raiseEvent(TestStartEvent e);

    void raiseEvent(TestEndEvent e);

    void raiseEvent(TestFailEvent e);

    void raiseEvent(TestSuccessEvent e);
}