Forum Discussion

ecimionatto's avatar
ecimionatto
New Contributor
15 years ago

maven plugin and datasinks

Is it possible to run tests that have datasinks using the maven plugin? I am running soapui tests using the plugin as a dependency on my project, but it fails when the soapui tests have datasinks.

<dependency>
<groupId>eviware</groupId>
<artifactId>maven-soapui-plugin</artifactId>
<version>2.5.1</version>
</dependency>

test
void test_project() {
runner.setProjectFile "soapui-project.xml"
runner.run()
}

4 Replies

  • Hi,

    DataSinks are soapUI Pro only, you need to use the pro version of the maven plugin.

    regards!

    /Ole
    eviware.com
  • Thanks for the response, but the error happens when I use the pro version as well.

    maven dependency:
    <dependency>
    <groupId>eviware</groupId>
    <artifactId>maven-soapui-pro-plugin</artifactId>
    <version>3.6.1</version>
    </dependency>

    groovy script that execute the test:
    test
    void test_soapui_project() {
    runner.setProjectFile "jsoapui-project.xml"
    runner.run()
    }

    when I execute mvn clean install the datasink step does not apply the data to the following request:
    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:v1="http://xmlns.test.com/test/ds/v1.0">
    <soapenv:Header/>
    <soapenv:Body>
    <v1:getTree><id>${DataSink to get test ID#TestID}</id></v1:getTestTree>
    </soapenv:Body>
    </soapenv:Envelope>

    NOTE: the same test works fine when I am using the soapUI Pro 3.6.1 desktop application.

    I am missing something?

    Thanks once again
  • Hello,

    I'm not quite sure what are you trying to achieve...data sink test step is used for
    storing collected data, and this more looks like you need data source test step,
    to retrieve data from some storage and apply it to the request. Can you please provide
    some more details of your testing scenario.

    regards!
    Predrag
    eviware.com
  • I have a CRUD scenario where the datasink is used to store the id returned in the xml response during a create method. The id needed to be reused for read/update/delete operations.

    The soapui test works fine when executed inside soapui software but it fails when the tests are executed inside a maven project using the maven soapui dependency maven-soapui-pro-plugin version 3.6.1.

    Thanks in advance.