Forum Discussion

deeRavin's avatar
deeRavin
New Contributor
14 years ago

Xpath assertions

Hi there,

I have an xml response like :
<abcd>
<e>
<example1>
<id>4</id>
<type>XYZ</type>
<uri>/efgh/edk</uri>
</example1>
</e>
</abcd>

I am trying to validate the id using xpath assertion with the following expression :
//*:abcd/*:e/*:example1/*:id

when I click on 'Select from current' , I get the correct expected result, I save and run the test, its perfectly fine.

When I run the same test using maven, I get comparison failure error.
Please help me with this.

3 Replies

  • deeRavin's avatar
    deeRavin
    New Contributor
    Re: Missing dependencies in repository for maven-soapui-plug

    Postby pcornish » 06 Jul 2011 18:08
    Guys,

    I'm now seeing this behaviour for version 4 of the maven-soapui-plugin. Assertions pass in soapUI 4.0.0 but fail when the project is run via the Maven plugin.

    The XPath assertions pass fine using version 3.6.1 of the plugin, but fail with the following error when using 4.0.0 or 4.0.0-SNAPSHOT dependencies.

    Code: Select all
    Status: FAILED
    Time Taken: 2740
    Size: 1891
    Timestamp: Wed Jul 06 17:55:19 BST 2011
    TestStep: Request


    ----------------- Messages ------------------------------
    [Check status] junit/framework/ComparisonFailure

    I saw this post.. has this problem been solved with viewtopic.php?f=13&t=6552&p=23264 the maven dependencies fix?
  • My advice would be to stick on SoapUi 3.6.1 or even 3.5.1 like me unless you require an upgrade for a reason.
    The newer versions have a lot of regression issues.

    Omar EL Mandour
  • jkester's avatar
    jkester
    Occasional Contributor
    I noticed as well that the maven plugin is missing some dependencies. Always run the test with testrunner as well, and then start comparing libs which are in soapui installation against lib used by maven. With -X it should be possible to find out which ones are used.

    My current extension of dependencies is:

    <dependency>
    <!-- not automatic resolved dependency of maven-soapui-pro-plugin -->
    <groupId>jgoodies</groupId>
    <artifactId>looks</artifactId>
    <version>2.2.0</version>
    </dependency>
    <dependency>
    <!-- not automatic resolved dependency of maven-soapui-pro-plugin -->
    <groupId>fife</groupId>
    <artifactId>rsyntaxtextarea</artifactId>
    <version>1.3.4</version>
    </dependency>
    <dependency>
    <groupId>junit</groupId>
    <artifactId>junit</artifactId>
    <version>4.8</version>
    </dependency>
    <dependency>
    <groupId>org.apache.xmlbeans</groupId>
    <artifactId>xmlbeans-xpath</artifactId>
    <version>2.4.0</version>
    </dependency>