Search in sources :

Example 16 with Endpoint

use of io.irontest.models.endpoint.Endpoint in project irontest by zheng-wang.

the class IIBTeststepRunner method run.

protected BasicTeststepRun run(Teststep teststep) throws Exception {
    Endpoint endpoint = teststep.getEndpoint();
    String actualRunnerClassName;
    ClassLoader classLoader;
    if (Endpoint.TYPE_IIB.equals(endpoint.getType())) {
        // it is an IIB 10.0 endpoint
        actualRunnerClassName = "io.irontest.core.runner.IIB100TeststepRunner";
        classLoader = iib100ClassLoader;
    } else {
        // it is an IIB 9.0 endpoint
        actualRunnerClassName = "io.irontest.core.runner.IIB90TeststepRunner";
        classLoader = iib90ClassLoader;
    }
    Class actualRunnerClass = Class.forName(actualRunnerClassName, false, classLoader);
    Constructor<TeststepRunner> constructor = actualRunnerClass.getConstructor(Endpoint.class);
    TeststepRunner actualRunner = constructor.newInstance(endpoint);
    actualRunner.setTestcaseRunContext(getTestcaseRunContext());
    return actualRunner.run(teststep);
}
Also used : Endpoint(io.irontest.models.endpoint.Endpoint)

Aggregations

Endpoint (io.irontest.models.endpoint.Endpoint)16 ObjectMapper (com.fasterxml.jackson.databind.ObjectMapper)5 Teststep (io.irontest.models.teststep.Teststep)3 SQLException (java.sql.SQLException)3 Environment (io.irontest.models.Environment)2 IOException (java.io.IOException)2 DataTable (io.irontest.models.DataTable)1 Testcase (io.irontest.models.Testcase)1 UserDefinedProperty (io.irontest.models.UserDefinedProperty)1 Assertion (io.irontest.models.assertion.Assertion)1 MQEndpointProperties (io.irontest.models.endpoint.MQEndpointProperties)1 SOAPEndpointProperties (io.irontest.models.endpoint.SOAPEndpointProperties)1 HTTPHeader (io.irontest.models.teststep.HTTPHeader)1 SOAPTeststepProperties (io.irontest.models.teststep.SOAPTeststepProperties)1 PreparedStatement (java.sql.PreparedStatement)1 ResultSetMetaData (java.sql.ResultSetMetaData)1 ArrayList (java.util.ArrayList)1 Date (java.util.Date)1 HashMap (java.util.HashMap)1 Map (java.util.Map)1