0
votes

I'm trying to integrate SoapUI test cases with Allure to generate reports. There is a maven project, and I'm using soapui maven plugin to run test cases. Test cases run fine, JUnit report is generated, but there are no allure-results. Pls check my pom, it can have some wrong usages of allure plugin.

<?xml version='1.0' encoding='UTF-8'?><project xmlns:1='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'>

<name>SOAPUI Tests</name>
<version>1.0</version>
<modelVersion>4.0.0</modelVersion>
<groupId>soapui-tests</groupId>
<artifactId>soapui-tests</artifactId>
<description>SoapUI Integration Tests</description>

<properties>
 <allure.version>1.4.19</allure.version>
 <allure.maven.version>2.4</allure.maven.version>
 <surefire.version>2.18.1</surefire.version>
 <aspectj.version>1.7.4</aspectj.version>
 <soapui.version>4.6.1</soapui.version>
</properties>

<dependencies>
    <dependency>
        <groupId>ru.yandex.qatools.allure</groupId>
        <artifactId>allure-junit-adaptor</artifactId>
        <version>${allure.version}</version>
    </dependency>
    <dependency>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-report-plugin</artifactId>
        <version>${surefire.version}</version>
    </dependency>
</dependencies>

<build>
    <plugins>
        <plugin>
            <groupId>com.smartbear.soapui</groupId>
            <artifactId>soapui-maven-plugin</artifactId>
            <version>${soapui.version}</version>

            <configuration>
                <outputFolder>${basedir}/target/soapui-results</outputFolder>
                <junitReport>true</junitReport>
                <exportAll>true</exportAll >
                <printReport>true</printReport>
                <testFailIgnore>true</testFailIgnore>
            </configuration>

            <dependencies>
                <dependency>
                    <groupId>com.sun.mail</groupId>
                    <artifactId>javax.mail</artifactId>
                    <version>1.5.0-b01</version>
                </dependency>
            </dependencies>

            <executions>
                <execution>
                    <id>x_project.xml</id>
                    <phase>process-test-classes</phase>
                    <goals>
                        <goal>test</goal>
                    </goals>
                    <configuration>
                        <projectFile>x_project.xml</projectFile>
                    </configuration>
                </execution>
            </executions>
        </plugin>
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-surefire-plugin</artifactId>
            <version>${surefire.version}</version>
            <configuration>
                <testFailureIgnore>true</testFailureIgnore>
                <argLine>
                    -javaagent:${settings.localRepository}/org/aspectj/aspectjweaver/${aspectj.version}/aspectjweaver-${aspectj.version}.jar
                </argLine>
                <properties>
                    <property>
                        <name>listener</name>
                        <value>ru.yandex.qatools.allure.junit.AllureRunListener</value>
                    </property>
                </properties>
            </configuration>
            <dependencies>
                <dependency>
                    <groupId>org.aspectj</groupId>
                    <artifactId>aspectjweaver</artifactId>
                    <version>${aspectj.version}</version>
                </dependency>
            </dependencies>
        </plugin>
    </plugins>
</build>

<reporting>
    <excludeDefaults>true</excludeDefaults>
    <plugins>
        <plugin>
            <groupId>ru.yandex.qatools.allure</groupId>
            <artifactId>allure-maven-plugin</artifactId>
            <version>${allure.maven.version}</version>
        </plugin>
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-surefire-report-plugin</artifactId>
            <version>${surefire.version}</version>
        </plugin>
    </plugins>
</reporting>

mnv test site command returns following error:

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-site-plugin:3.3:site (default-site) on project soapui-tests: Error during page generation: Error rendering Maven report: Could not generate the report: InvocationTargetException: Could not find any allure results -> [Help 1]

2

2 Answers

0
votes

I think Allure reports is not designed for XML, generated by soapui. I tried the same some time ago and did not find solution. Now I'm going to contact allure team about that. Will inform you shortly.

0
votes

As i can see in your pom.xml, you use non-standard output folder for your test results ${basedir}/target/soapui-results. So you need to configure allure.results.directory property to tell allure plugin where to look for test results.