Saturday, November 14, 2015

Writing WSO2 ESB Connector Integration Test

We assume that readers have basic knowledge about TestNG and Connector. If not please get the knowledge about connector development from here before read this post. In this post we are analyzing how we can implement a connector integration test. Integration test is very important to evaluate the effectiveness of the connector functions. This post will focus on integration test based on Hello World Sample. 

   
 WSO2 ESB have more features like connectors. As we Discussed in earlier post connector used to interact with third party API's(facebook, twiter, Google API's and etc).   SO for the developers need to verify the functions before going into publish or release so they need mechanism to verify whether the methods are working as expected so Normally what connector integration test do is it will sent the request through the ESB and sent request to API directly and compare both results.

Writing Integration Test for WSO2 ESB Connector 

Lets go step by step process for integration test.

First Using maven archetype generate a connector for Sample connector(Let's take sample as connector name).

Once you generate the connector as mentioned in previews post you will get the folder structure like in below image.


 This test case written to test connector with name Sample so some values are hard coded we need to change these values for our connectors and some of the files are exist because of integration test class extends from ESBIntegrationTest later i will explain those changes one by one.

pom.xml

<project xmlns="http://maven.apache.org/POM/4.0.0"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <groupId>org.wso2.carbon.connector</groupId>
    <artifactId>org.wso2.carbon.connector.sample</artifactId>
    <version>1.0.0</version>
    <packaging>bundle</packaging>
    <name>WSO2 Carbon - Connector For Sample</name>
    <url>http://wso2.org</url>
    <properties>
        <axis2.osgi.version.range>1.7.1</axis2.osgi.version.range>
        <axiom.osgi.version.range>1.2.5</axiom.osgi.version.range>
        <connector.name>Sample</connector.name>
        <test.framework.version>4.2.0</test.framework.version>
        <esb.version>4.9.0</esb.version>
        <carbon.kernel.version>4.4.1</carbon.kernel.version>
        <emma.version>2.1.5320</emma.version>
        <synapse.version>2.1.3-wso2v11</synapse.version>
        <carbon.mediation.version>4.4.10</carbon.mediation.version>
        <json.version>2.0.0.wso2v1</json.version>
        <carbon.integration.framework>4.0.0</carbon.integration.framework>
        <org.testng.version>6.1.1</org.testng.version>
        <integration.base.version>1.0.1</integration.base.version>
    </properties>
    <dependencies>
        <dependency>
            <groupId>org.wso2.carbon.mediation</groupId>
            <artifactId>org.wso2.carbon.mediation.initializer</artifactId>
            <version>${carbon.mediation.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.synapse</groupId>
            <artifactId>synapse-core</artifactId>
            <version>${synapse.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.synapse</groupId>
            <artifactId>synapse-commons</artifactId>
            <version>${synapse.version}</version>
        </dependency>
        <dependency>
            <groupId>org.json.wso2</groupId>
            <artifactId>json</artifactId>
            <version>${json.version}</version>
        </dependency>
        <dependency>
            <groupId>org.wso2.carbon.mediation</groupId>
            <artifactId>org.wso2.carbon.connector.core</artifactId>
            <version>${carbon.mediation.version}</version>
        </dependency>
        <dependency>
            <groupId>org.wso2.carbon.mediation</groupId>
            <artifactId>org.wso2.carbon.mediation.library.stub</artifactId>
            <version>${carbon.mediation.version}</version>
            <scope>test</scope>
            <exclusions>
                <exclusion>
                    <groupId>javax.servlet</groupId>
                    <artifactId>servlet-api</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.wso2.carbon</groupId>
            <artifactId>org.wso2.carbon.integration.framework</artifactId>
            <version>${carbon.integration.framework}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.wso2.carbon.automation</groupId>
            <artifactId>org.wso2.carbon.automation.api</artifactId>
            <version>${test.framework.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.wso2.carbon.automation</groupId>
            <artifactId>org.wso2.carbon.automation.core</artifactId>
            <version>${test.framework.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.wso2.carbon.automation</groupId>
            <artifactId>org.wso2.carbon.automation.utils</artifactId>
            <version>${test.framework.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>emma</groupId>
            <artifactId>emma</artifactId>
            <version>${emma.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.testng</groupId>
            <artifactId>testng</artifactId>
            <version>${org.testng.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.wso2.carbon</groupId>
            <artifactId>SecVerifier</artifactId>
            <version>${carbon.kernel.version}</version>
            <type>aar</type>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.wso2.esb</groupId>
            <artifactId>org.wso2.carbon.esb.common</artifactId>
            <version>4.8.0</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.wso2.esb.integration</groupId>
            <artifactId>integration-base</artifactId>
            <version>${integration.base.version}</version>
            <scope>test</scope>
        </dependency>
    </dependencies>
    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>2.0</version>
                <configuration>
                    <source>1.5</source>
                    <target>1.5</target>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-dependency-plugin</artifactId>
                <executions>
                    <execution>
                        <id>copy</id>
                        <phase>generate-test-resources</phase>
                        <goals>
                            <goal>copy</goal>
                        </goals>
                        <configuration>
                            <artifactItems>
                                <artifactItem>
                                    <groupId>org.apache.commons</groupId>
                                    <artifactId>commons-email</artifactId>
                                    <version>1.2</version>
                                    <type>jar</type>
                                    <overWrite>true</overWrite>
                                    <outputDirectory>target/connector/dependencies</outputDirectory>
                                </artifactItem>
                            </artifactItems>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-assembly-plugin</artifactId>
                <executions>
                    <execution>
                        <id>email-library</id>
                        <phase>compile</phase>
                        <goals>
                            <goal>attached</goal>
                        </goals>
                        <configuration>
                            <finalName>${connector.name}-connector-1.0.0</finalName>
                            <appendAssemblyId>false</appendAssemblyId>
                            <filters>
                                <filter>src/main/assembly/filter.properties</filter>
                            </filters>
                            <descriptors>
                                <descriptor>src/main/assembly/assemble-connector.xml</descriptor>
                            </descriptors>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>2.12.4</version>
                <inherited>false</inherited>
                <configuration>
                    <!-- <argLine>-Xms512m -Xmx1024m -XX:MaxPermSize=128m -Xmx1024m -XX:PermSize=256m -XX:MaxPermSize=512m -Xdebug
                       -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5006 </argLine> -->
                    <argLine>-Xms512m -Xmx1024m -XX:MaxPermSize=128m</argLine>
                    <testFailureIgnore>true</testFailureIgnore>
                    <disableXmlReport>false</disableXmlReport>
                    <parallel>false</parallel>
                    <suiteXmlFiles>
                        <suiteXmlFile>src/test/resources/testng.xml</suiteXmlFile>
                    </suiteXmlFiles>
                    <systemProperties>
                        <property>
                            <name>framework.resource.location</name>
                            <value>
                                ${basedir}/src/test/resources/
                            </value>
                            <properties>
                                <test.framework.version>4.4.1</test.framework.version>
                            </properties>
                        </property>
                        <property>
                            <name>server.list</name>
                            <value>
                                ESB
                            </value>
                        </property>
                        <property>
                            <name>usedefaultlisteners</name>
                            <value>false</value>
                        </property>
                        <maven.test.haltafterfailure>false</maven.test.haltafterfailure>
                        <carbon.zip>
                            ${basedir}/repository/wso2esb-${esb.version}.zip
                        </carbon.zip>
                        <emma.home>${basedir}/target/emma</emma.home>
                        <instr.file>${basedir}/src/test/resources/instrumentation.txt</instr.file>
                        <filters.file>${basedir}/src/test/resources/filters.txt</filters.file>
                        <emma.output>${basedir}/target/emma</emma.output>
                        <property>
                            <name>connector_repo</name>
                            <value>${basedir}/target</value>
                        </property>
                    </systemProperties>
                    <workingDirectory>${basedir}/target</workingDirectory>
                </configuration>
            </plugin>
            <plugin>
                <artifactId>maven-dependency-plugin</artifactId>
                <executions>
                    <execution>
                        <id>copy-emma-dependencies</id>
                        <phase>compile</phase>
                        <goals>
                            <goal>copy-dependencies</goal>
                        </goals>
                        <configuration>
                            <outputDirectory>${project.build.directory}/emma</outputDirectory>
                            <includeTypes>jar</includeTypes>
                            <includeArtifactIds>emma,org.wso2.carbon.automation.core
                            </includeArtifactIds>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.felix</groupId>
                <artifactId>maven-bundle-plugin</artifactId>
                <extensions>true</extensions>
                <configuration>
                    <instructions>
                        <Bundle-SymbolicName>${project.artifactId}</Bundle-SymbolicName>
                        <Bundle-Name>${project.artifactId}</Bundle-Name>
                        <Export-Package>!javax.servlet,
                            !javax.servlet.http,
                            org.wso2.carbon.connector.*
                        </Export-Package>
                        <Import-Package>!javax.xml.soap,
                            javax.xml.stream.*; version="1.0.1",
                            org.apache.axis2.rpc.receivers; version="${axis2.osgi.version.range}",
                            org.apache.axiom.*; version="${axiom.osgi.version.range}",
                            org.apache.axis2; version="${axis2.osgi.version.range}",
                            org.apache.axis2.description; version="${axis2.osgi.version.range}",
                            org.apache.axis2.engine; version="${axis2.osgi.version.range}",
                            org.apache.axis2.context; version="${axis2.osgi.version.range}",
                            org.apache.commons.logging,
                            org.apache.synapse,
                            org.apache.synapse.config,
                            org.apache.synapse.config.xml,
                            org.apache.synapse.core,
                            org.apache.synapse.core.axis2,
                            org.apache.synapse.endpoints.*,
                            org.apache.synapse.mediators.base,
                            org.apache.synapse.libraries.*,
                            org.apache.axis2.transport.base,
                            org.wso2.carbon.core,
                            org.wso2.carbon.registry.core.service; version=1.0.1,
                            javax.xml.soap; version=1.0.0,
                            *;resolution:=optional
                        </Import-Package>
                    </instructions>
                </configuration>
            </plugin>
        </plugins>
    </build>
    <repositories>
        <repository>
            <id>wso2-nexus</id>
            <name>WSO2 internal Repository</name>
            <url>http://maven.wso2.org/nexus/content/groups/wso2-public/</url>
            <releases>
                <enabled>true</enabled>
                <updatePolicy>daily</updatePolicy>
                <checksumPolicy>ignore</checksumPolicy>
            </releases>
        </repository>
        <repository>
            <id>wso2.releases</id>
            <name>WSO2 internal Repository</name>
            <url>http://maven.wso2.org/nexus/content/repositories/releases/</url>
            <releases>
                <enabled>true</enabled>
                <updatePolicy>daily</updatePolicy>
                <checksumPolicy>ignore</checksumPolicy>
            </releases>
        </repository>
        <repository>
            <id>wso2.snapshots</id>
            <name>Apache Snapshot Repository</name>
            <url>http://maven.wso2.org/nexus/content/repositories/snapshots/</url>
            <snapshots>
                <enabled>true</enabled>
                <updatePolicy>daily</updatePolicy>
            </snapshots>
            <releases>
                <enabled>false</enabled>
            </releases>
        </repository>
    </repositories>
    <distributionManagement>
        <repository>
            <id>nexus-releases</id>
            <name>WSO2 Release Distribution Repository</name>
            <url>http://maven.wso2.org/nexus/service/local/staging/deploy/maven2/</url>
        </repository>
        <snapshotRepository>
            <id>wso2.snapshots</id>
            <name>Apache Snapshot Repository</name>
            <url>http://maven.wso2.org/nexus/content/repositories/snapshots/</url>
        </snapshotRepository>
    </distributionManagement>
</project>
It will contain most of the required dependencies for connector development but if we need specific vendor dependency we can add in this dependency list. specially we are adding maven-surefire-plugin plugin for testing and other plugin's are important for connector and test. add repository if your getting dependency from other then these repositories. It will call testng.xml file for select the integration test classes if test enabled.

testng.xml

<suite name="ESBTestSuite" parallel="false">
    <listeners>
        <listener class-name="org.wso2.carbon.automation.core.PlatformExecutionManager"/>
        <listener class-name="org.wso2.carbon.automation.core.PlatformSuiteManager"/>
        <listener class-name="org.wso2.carbon.automation.core.PlatformAnnotationTransferManager"/>
        <listener class-name="org.wso2.carbon.automation.core.PlatformTestManager"/>
        <listener class-name="org.wso2.carbon.automation.core.PlatformReportManager"/>
    </listeners>
    <test name="Sample-Connector-Test" preserve-order="true" verbose="2">
        <packages>
            <package name="org.wso2.carbon.connector"/>
        </packages>
    </test>
</suite>

Here we need set the package name or class name we are going to call for integration test.  another important file is resource properties.

Sample.properties

proxyDirectoryRelativePath=/../src/test/resources/artifacts/ESB/config/proxies/sampleProxy/
requestDirectoryRelativePath=/../src/test/resources/artifacts/ESB/config/restRequests/sampleRequest/
resourceDirectoryRelativePath=/../src/test/resources/artifacts/ESB/config/resources/sample/

This resource properties will contain the information for integration test and the recommendation is please keep the connector name for resource properties as it is.  above two resources are very important for test first one is to set path to proxy need to load in ESB for testing and second one is the request need to sent to the proxy.

If your api needs to upload any certificates please View the certificate details (the steps vary by browser) and then export the trust certificate to the file system. Use the ESB Management Console or the following command to import that certificate into the ESB client keystore.And add inside Keystores/products also.

"keytool -importcert -file <certificate file> -keystore <ESB>/repository/resources/security/client-truststore.jks -alias "TrustCertImport" 

sampleProxy.xml


<proxy xmlns="http://ws.apache.org/ns/synapse" name="Sample"
       transports="https,http" statistics="disable" trace="disable"
       startOnLoad="true">
    <target>
        <inSequence>
            <property name="generated_param" expression="json-eval(.generated_param)"/>
            <Sample.sample_template>
                <generated_param>{$ctx:generated_param}</generated_param>
            </Sample.sample_template>
            <log level="full"/>
            <respond/>
        </inSequence>
    </target>
    <description/>
</proxy>
 Since we are written connector method sample_template in previous post here we are going to call write test for that method. here property mediator will receive the value from request and the we are sending that received parameter to sample_template method in Sample connector.

SampleRequest.json

{
  "generated_param": "%s(message)"
}
The value for the message will be taken from resource properties Sample.properties . This is the sample request we are going to sent for test.

SampleIntegrationTest.java

package org.wso2.carbon.connector;

import org.json.JSONObject;
import org.testng.annotations.BeforeClass;
import org.testng.annotations.Test;
import org.wso2.connector.integration.test.base.ConnectorIntegrationTestBase;
import org.wso2.connector.integration.test.base.RestResponse;

import java.util.HashMap;
import java.util.Map;


public class SampleIntegrationTest extends ConnectorIntegrationTestBase {

    private Map<String, String> esbRequestHeadersMap = new HashMap<String, String>();
    private Map<String, String> apiRequestHeadersMap = new HashMap<String, String>();

    @BeforeClass(alwaysRun = true)
    public void setEnvironment() throws Exception {

        init("Sample-connector-1.0.0");
        esbRequestHeadersMap.put("Accept-Charset", "UTF-8");
        esbRequestHeadersMap.put("Content-Type", "application/json");
    }

    @Test(enabled = true, groups = {"wso2.esb"}, description = "Sample test case")
    public void testSample() throws Exception {
        log.info("Successfully tested");
        RestResponse<JSONObject> esbRestResponse =
                sendJsonRestRequest(proxyUrl, "POST", esbRequestHeadersMap, "sampleRequest.json"); 
        Assert.assertEquals(esbRestResponse.getHttpStatusCode(),200);  
   }
}

Noramlly, we will write first method with @BeforeClass annotation because these should be compleate befre start the test methods. here we need to call super class init method to load the connector into ESB and setup the testing environment in ESB. In init method we need to set connector name as it is. because it will search inside the target folder with this name. more over to that here we are defining our request from testing environment going to be in application/json format and Accept-Charset you can add more header for ESB request. If we get responce from API we need to set headers for API requeast header also in this sample we are nt using any API so we no need to write that.

As test we are here going to test our sample_template method so first we are creating esbRestResponce and assign the responce from sendJsonRestRequest method. to get the response we are sending esbRequestHeaderMap, sampleRequest.json, proxyUrl and method should be in POST method. proxyUrl will be the url of the proxy we are loaded for test (ConnectorIntegrationBase will find the url from our proxy name).

Finally we will check the results with expected results. here we expecting 200 response code

Now, we have completed the connector integration test. Before run integration test paste copy of ESB zip file inside repository folder in connector class path.

If run the integration test as mentioned above you will get output like below one


[2016-05-30 16:41:00,938]  INFO {org.wso2.carbon.automation.core.utils.coreutils.InputStreamHandler} -  [2016-05-30 16:41:00,938]  INFO - DeploymentInterceptor Deploying Axis2 service: Sample {super-tenant}
[2016-05-30 16:41:00,939]  INFO {org.wso2.carbon.automation.core.utils.coreutils.InputStreamHandler} -  [2016-05-30 16:41:00,939]  INFO - ProxyService Successfully created the Axis2 service for Proxy service : Sample
[2016-05-30 16:41:00,948]  INFO {org.wso2.carbon.automation.api.clients.proxy.admin.ProxyServiceAdminClient} -  Proxy Added
[2016-05-30 16:41:00,952]  INFO {org.wso2.carbon.automation.core.PlatformTestManager} -  Running the test method --- org.wso2.carbon.connector.SampleIntegrationTest.testSample ----
[2016-05-30 16:41:00,953]  INFO {org.wso2.carbon.connector.SampleIntegrationTest} -  Successfully tested
[2016-05-30 16:41:00,971]  INFO {org.wso2.carbon.automation.core.utils.coreutils.InputStreamHandler} -  [2016-05-30 16:41:00,971] DEBUG - wire >> "POST /services/Sample HTTP/1.1[\r][\n]"
[2016-05-30 16:41:00,971]  INFO {org.wso2.carbon.automation.core.utils.coreutils.InputStreamHandler} -  [2016-05-30 16:41:00,971] DEBUG - wire >> "Accept-Charset: UTF-8[\r][\n]"
[2016-05-30 16:41:00,972]  INFO {org.wso2.carbon.automation.core.utils.coreutils.InputStreamHandler} -  [2016-05-30 16:41:00,972] DEBUG - wire >> "Content-Type: application/json[\r][\n]"
[2016-05-30 16:41:00,972]  INFO {org.wso2.carbon.automation.core.utils.coreutils.InputStreamHandler} -  [2016-05-30 16:41:00,972] DEBUG - wire >> "User-Agent: Java/1.7.0_79[\r][\n]"
[2016-05-30 16:41:00,972]  INFO {org.wso2.carbon.automation.core.utils.coreutils.InputStreamHandler} -  [2016-05-30 16:41:00,972] DEBUG - wire >> "Host: localhost:8280[\r][\n]"
[2016-05-30 16:41:00,972]  INFO {org.wso2.carbon.automation.core.utils.coreutils.InputStreamHandler} -  [2016-05-30 16:41:00,972] DEBUG - wire >> "Accept: text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2[\r][\n]"
[2016-05-30 16:41:00,972]  INFO {org.wso2.carbon.automation.core.utils.coreutils.InputStreamHandler} -  [2016-05-30 16:41:00,972] DEBUG - wire >> "Connection: keep-alive[\r][\n]"
[2016-05-30 16:41:00,972]  INFO {org.wso2.carbon.automation.core.utils.coreutils.InputStreamHandler} -  [2016-05-30 16:41:00,972] DEBUG - wire >> "Content-Length: 43[\r][\n]"
[2016-05-30 16:41:00,972]  INFO {org.wso2.carbon.automation.core.utils.coreutils.InputStreamHandler} -  [2016-05-30 16:41:00,972] DEBUG - wire >> "[\r][\n]"
[2016-05-30 16:41:00,972]  INFO {org.wso2.carbon.automation.core.utils.coreutils.InputStreamHandler} -  [2016-05-30 16:41:00,972] DEBUG - wire >> "{[\n]"
[2016-05-30 16:41:00,972]  INFO {org.wso2.carbon.automation.core.utils.coreutils.InputStreamHandler} -  [2016-05-30 16:41:00,972] DEBUG - wire >> "  "generated_param": "sample connector"[\n]"
[2016-05-30 16:41:00,972]  INFO {org.wso2.carbon.automation.core.utils.coreutils.InputStreamHandler} -  [2016-05-30 16:41:00,972] DEBUG - wire >> "}"
[2016-05-30 16:41:01,010]  INFO {org.wso2.carbon.automation.core.utils.coreutils.InputStreamHandler} -  [2016-05-30 16:41:01,010]  INFO - LogMediator To: /services/Sample, MessageID: urn:uuid:ece8a791-3244-45d8-a1fc-1958a084d0c4, Direction: request, *******template_param******** = ["sample connector"], Payload: {
[2016-05-30 16:41:01,010]  INFO {org.wso2.carbon.automation.core.utils.coreutils.InputStreamHandler} -    "generated_param": "sample connector"
[2016-05-30 16:41:01,010]  INFO {org.wso2.carbon.automation.core.utils.coreutils.InputStreamHandler} -  }
[2016-05-30 16:41:01,011]  INFO {org.wso2.carbon.automation.core.utils.coreutils.InputStreamHandler} -  [2016-05-30 16:41:01,011]  INFO - SampleConnector Sample sample connector received message :["sample connector"]
[2016-05-30 16:41:01,011]  INFO {org.wso2.carbon.automation.core.utils.coreutils.InputStreamHandler} -  [2016-05-30 16:41:01,011]  INFO - LogMediator To: /services/Sample, MessageID: urn:uuid:ece8a791-3244-45d8-a1fc-1958a084d0c4, Direction: request, Payload: {
[2016-05-30 16:41:01,011]  INFO {org.wso2.carbon.automation.core.utils.coreutils.InputStreamHandler} -    "generated_param": "sample connector"
[2016-05-30 16:41:01,011]  INFO {org.wso2.carbon.automation.core.utils.coreutils.InputStreamHandler} -  }
[2016-05-30 16:41:01,022]  INFO {org.wso2.carbon.automation.core.utils.coreutils.InputStreamHandler} -  [2016-05-30 16:41:01,022] DEBUG - wire << "HTTP/1.1 200 OK[\r][\n]"
[2016-05-30 16:41:01,022]  INFO {org.wso2.carbon.automation.core.utils.coreutils.InputStreamHandler} -  [2016-05-30 16:41:01,022] DEBUG - wire << "Host: localhost:8280[\r][\n]"
[2016-05-30 16:41:01,022]  INFO {org.wso2.carbon.automation.core.utils.coreutils.InputStreamHandler} -  [2016-05-30 16:41:01,022] DEBUG - wire << "Accept-Charset: UTF-8[\r][\n]"
[2016-05-30 16:41:01,022]  INFO {org.wso2.carbon.automation.core.utils.coreutils.InputStreamHandler} -  [2016-05-30 16:41:01,022] DEBUG - wire << "Content-Type: application/json; charset=UTF-8[\r][\n]"
[2016-05-30 16:41:01,022]  INFO {org.wso2.carbon.automation.core.utils.coreutils.InputStreamHandler} -  [2016-05-30 16:41:01,022] DEBUG - wire << "Accept: text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2[\r][\n]"
[2016-05-30 16:41:01,022]  INFO {org.wso2.carbon.automation.core.utils.coreutils.InputStreamHandler} -  [2016-05-30 16:41:01,022] DEBUG - wire << "Date: Mon, 30 May 2016 11:11:01 GMT[\r][\n]"
[2016-05-30 16:41:01,023]  INFO {org.wso2.carbon.automation.core.utils.coreutils.InputStreamHandler} -  [2016-05-30 16:41:01,023] DEBUG - wire << "Transfer-Encoding: chunked[\r][\n]"
[2016-05-30 16:41:01,023]  INFO {org.wso2.carbon.automation.core.utils.coreutils.InputStreamHandler} -  [2016-05-30 16:41:01,023] DEBUG - wire << "Connection: keep-alive[\r][\n]"
[2016-05-30 16:41:01,023]  INFO {org.wso2.carbon.automation.core.utils.coreutils.InputStreamHandler} -  [2016-05-30 16:41:01,023] DEBUG - wire << "[\r][\n]"
[2016-05-30 16:41:01,023]  INFO {org.wso2.carbon.automation.core.utils.coreutils.InputStreamHandler} -  [2016-05-30 16:41:01,023] DEBUG - wire << "2b[\r][\n]"
[2016-05-30 16:41:01,023]  INFO {org.wso2.carbon.automation.core.utils.coreutils.InputStreamHandler} -  [2016-05-30 16:41:01,023] DEBUG - wire << "{[\n]"
[2016-05-30 16:41:01,023]  INFO {org.wso2.carbon.automation.core.utils.coreutils.InputStreamHandler} -  [2016-05-30 16:41:01,023] DEBUG - wire << "  "generated_param": "sample connector"[\n]"
[2016-05-30 16:41:01,023]  INFO {org.wso2.carbon.automation.core.utils.coreutils.InputStreamHandler} -  [2016-05-30 16:41:01,023] DEBUG - wire << "}[\r][\n]"
[2016-05-30 16:41:01,023]  INFO {org.wso2.carbon.automation.core.utils.coreutils.InputStreamHandler} -  [2016-05-30 16:41:01,023] DEBUG - wire << "0[\r][\n]"
[2016-05-30 16:41:01,023]  INFO {org.wso2.carbon.automation.core.utils.coreutils.InputStreamHandler} -  [2016-05-30 16:41:01,023] DEBUG - wire << "[\r][\n]"
[2016-05-30 16:41:01,050]  INFO {org.wso2.carbon.connector.SampleIntegrationTest} -  200
[2016-05-30 16:41:01,051]  INFO {org.wso2.carbon.automation.core.PlatformTestManager} -  On test success..
[2016-05-30 16:41:01,056]  INFO {org.wso2.carbon.automation.core.utils.coreutils.InputStreamHandler} -  [2016-05-30 16:41:01,056]  INFO - DeploymentInterceptor Removing Axis2 Service: Sample {super-tenant}
[2016-05-30 16:41:01,075]  INFO {org.wso2.carbon.automation.api.clients.proxy.admin.ProxyServiceAdminClient} -  Proxy Deleted
PASSED: testSample
        Sample test case

===============================================
    Sample-Connector-Test
    Tests run: 1, Failures: 0, Skips: 0
===============================================

No comments:

Post a Comment