Giter Club home page Giter Club logo

maven-soapui-extension-plugin's Introduction

UPDATE 2021-08-27: This repository is now archived. Thanks to all contributors and users of this plugin.
I haven't used SoapUI since a long time and I no longer have time to maintain this plugin.

maven-soapui-extension-plugin Travis Build Status

This plugin adds new features and bug fixes to SmartBear plugins: soapui-pro-maven-plugin and soapui-maven-plugin.
For more information about how to use it, see the wiki.

Last released version: 4.6.4.2 (22-November-2014) available on Maven Central

News (06-March-2017)

Note: News archives are available in the wiki.

This plugin is dormant but it may be updated in the future.
Pull requests are welcomed and I still answer to new and pending issues.

Main features

Documentation

  • give tips about maven plugin configuration (both for maven-soapui-extension-plugin and SmartBear plugins)
  • provide full documentation of goals and parameters

New features

  • general
    • only one plugin for both SoapUI OSS and PRO support (SmartBear provides 2 plugin implementations)
  • convert-project additional goal
    • convert-project converts composite to standard projects or standard to composite projects
  • mock goal
    • add several parameters to activate and control the coverage report generation when using the pro runner
    • the runnerType parameter lets choose to use the open source or pro runner
  • mock-as-war additional goal
    • mock-as-war generates war file (and/or exploded war) that contains the mockservices defined in the SoapUi project as this can be done from the GUI
  • test goal
    • the junitHtmlReport parameter lets disable junit html report generation when using the pro runner
    • the runnerType parameter lets choose to use the open source or pro runner
    • the testsuiteProperties parameter lets override custom properties in test suites
    • configure the JunitReportCollector to be able to modify xml junit files generation
  • test-multi additional goal
    • test-multi allows to run several projects in the same plugin execution. Choice of projects to be runned is done by scanning one or several directories and selecting which projects to include/exclude
  • test-verify additional goal
    • test-verify lets user run soapui tests, perform post processing tasks and then fail the build if some tests have failed. This is very usefull to run multiple projects

Improvements

  • test goal
    • by default, logs are generated in a subdirectory of ${project.build.directory} see the logs documentation
    • do not display details of errors as exception stack trace to avoid flooding of the maven console, see #2
  • mock goal
    • by default, logs are generated in a subdirectory of ${project.build.directory} see the logs documentation

Bug fixes

  • almost all SmartBear plugin versions have missing dependencies. This is fixed in maven-soapui-extension-plugin, see the dedicated dependency issues page
  • fix the 'groovy.log' bug even in pre SoapUI 5 versions, see the logs documentation
  • mock goal
    • make the 'skip' parameter work, see #35
    • append groovy log messages only once in the console, see #68
  • test goal
    • append groovy log messages only once in the console, see #68

Tests

SmartBear maven plugins have almost no tests. Have a look on the soapui-maven-plugin-tester.

maven-soapui-extension-plugin has both unit tests and high-level tests. These high-level tests are

  • executed with the maven-invoker-plugin, this means that these tests are runned with maven plugins on real soapui projects
  • created to show bug or missing feature in SmartBear implementations
  • created to show fix, improvement or feature in maven-soapui-extension-plugin

Roadmap

Short term

  • support SoapUI 5.0.0, 5.1.0, 5.1.1 and 5.1.2
  • improve the test-multi goal to run multiple soapui projects. See opened issues
  • provide a new JunitReportCollector to have more details about failures (steps, assertions) in the junit report. See #42

Mid term

Long term

  • found a way to make report generation work without having a SoapUI installation (PRO feature)
  • add a goal to export wsdl interface from a SoapUI project
  • does not rely on SmartBear maven plugin

Supported java and maven versions

  • maven 2.2.1, 3.0.x (tested with 3.0.5), 3.1.x (tested with 3.1.1) and 3.2.x (tested with 3.2.1 and 3.2.3)
  • java 6 and 7 (soapui needs java 6+ as of version 4.0.0), java 8 experimental support

CI Build status

If it is not specified, the CI job

  • only builds the master branch
  • uses a shared local maven repository across builds
  • is runned
    • once a day if code modification occurs
    • on Linux OS

List of CI jobs

  • maven 3.3.9, oracle jdk7 (CloudBees) Build Status
  • maven 3.2.3, openjdk6, openjdk7, oracle jdk7 and oraclejdk8 (Travis) Travis Build Status - builds all pushes in all branches and pull requests, uses a fresh maven local repository at each build
  • maven 3.2.3, oracle jdk7, Windows OS (AppVeyor) Build status
  • maven 3.2.1, openjdk8 (CloudBees) CloudBees Build Status
  • maven 3.2.1, oracle jdk6 (CloudBees) CloudBees Build Status
  • maven 3.1.1, oracle jdk8 (CloudBees) Build Status
  • maven 3.1.1, oracle jdk7 (CloudBees) Build Status
  • maven 3.1.1, oracle jdk6 (CloudBees) Build Status
  • maven 3.0.5, oracle jdk8 (CloudBees) Build Status
  • maven 3.0.5, openjdk8 (CloudBees) CloudBees Build Status
  • maven 3.0.5, oracle jdk6 (CloudBees) Build Status
  • maven 2.2.1, openjdk8 (CloudBees) CloudBees Build Status
  • maven 2.2.1, oracle jdk6 (CloudBees) CloudBees Build Status
  • maven 2.2.1, oracle jdk7 (CloudBees) CloudBees Build Status

Built on CloudBees

Built on Travis

License

maven-soapui-extension-plugin is licensed under the Apache 2.0 software license

maven-soapui-extension-plugin's People

Contributors

gmlewis avatar redfish4ktc avatar thchittenden avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

maven-soapui-extension-plugin's Issues

[test goal] improve report with better junit xml files (OSS runner)

This is an old request that appears several times in the soapui forum

We should add a JunitReportCollector and make it be used by the TestCaseRunner.
Be carreful to not break the security-test goal which also depends on the same collector.

For implementation discussion, see: http://www.soapui.org/forum/viewtopic.php?f=5&t=19820

Add a mock-as-war goal

Currently, it is possible to generate a war based on soapui mock services

So, this is not easy to integrate the war generation in a maven build and it will be nice to have a new goal to do the job.

SmartBear 3.6.1 plugins depends on soapui 3.6

Because of this, we get an exception "groovy.lang.MissingMethodException: No signature of method" when registrating a jdbc driver via the new API (see Soapui forum).

This API - com.eviware.soapui.support.GroovyUtils.registerJdbcDriver() - has been added in soapui 3.6.1.
To fix the issue, we need to force the use of soapui 3.6.1 dependencies

[test goal] display the version of maven-soapui-extension-plugin

This is already displayed with maven 3

[INFO] --- maven-soapui-extension-plugin:4.0.0.1-SNAPSHOT:test (project-with-groovy) @ groovy-with-soapui-extension ---
SoapUI Pro 4.0.0 Maven2 TestCase Runner

but not when running the plugin with maven 2

[INFO] [soapui-pro:test {execution: project-with-groovy}]
SoapUI Pro 4.0.0 Maven2 TestCase Runner

So, add this information to the runner name

[test goal] log files should be generated by default in a subdirectory of ${project.build.directory}

The problem

Currently, it is possible to configure the destination directory for almost all log files by doing the following (the trailing / is a mandatory in the log output directory)

<plugin>
  <groupId>eviware</groupId>
  <artifactId>maven-soapui-plugin</artifactId>
  <version>4.0.1</version>
  <configuration>
    <soapuiProperties>
      <property>
        <name>soapui.logroot</name>
        <value>${project.build.directory}/soapui/my_logs/</value>
      </property>
    </soapuiProperties>
  </configuration>
</plugin>

But this should be done in all projects that used the soapui maven plugin.

The proposed solution

All log files should be generated in ${project.build.directory}/soapui/logs/ by default to avoid configuring this in all maven projects

Create a custom SoapUIProTestCaseRunner

We are going to need this because when want to add feature to standard runner as for the oss runner.
For instance, we need it to develop #39.

As for #38, we need to modify the log4j configuration file and update the integration tests that rely on the name of the runner for test sucess validation.

[test goal] run multiple test suites

Currently, we can only run

  • all suites
  • a single suite (with the testSuite parameter)

Now, we would like to run more than one suite. This has been requested in the soapui forum (at least in):

Possible configuration

<testSuites>
  <testSuite></testSuite>
</testSuites>

If the testSuite parameter is also used, then the test suite will runned as if it has been defined with the testSuites parameter.

[test goal] add a "junitHtmlReport" parameter (pro runner)

The pro runner generates by default an html report when the "junitReport" parameter is set to true. It also generates an xml file. See the post of the SmartBear Support which validates this behaviour.

This xml file mess the surefire-plugin-report or jenkins as it duplicates junit report already generated. So the tests seems to be duplicated.
See this soapui forum post for more information.

With this new parameter, we provide a way to avoid this duplication.

upgrade maven-invoker-plugin to 1.8

1.8 version availability: see maven central

When upgrading, remove the workaround of http://jira.codehaus.org/browse/MINVOKER-137

Details of the workaround
Previously, with maven 2.2.1, mergeUserSettings option generates a NPE (java 5 and 6)

java.lang.NullPointerException
        at org.apache.maven.settings.SettingsUtils.merge(SettingsUtils.java:110)
        at org.apache.maven.plugin.invoker.AbstractInvokerMojo.runBuilds(AbstractInvokerMojo.java:1035)
        at org.apache.maven.plugin.invoker.AbstractInvokerMojo.execute(AbstractInvokerMojo.java:670)
        at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:490)
        at hudson.maven.agent.PluginManagerInterceptor.executeMojo(PluginManagerInterceptor.java:182)

A workaround has been done in our project (we do not use the mergeUserSettings parameter, a profile is defined in a super parent pom used by all pom in integration tests)

drop support for maven 2.2.1

because we support maven 2.2.1, we got in trouble with

  • unable to use enum parameter as it has been introduced with maven 3 see MNG-4292. Force us to use String parameter for runnerType and projectConversionType
  • a bug with the maven-invoker-plugin (see #30)
  • unable to use List and Set param, see #108

Display build date and commit id when displaying plugin version

Currently, we only display version number of the plugin and the soapui version when starting a runner (this is duplicated in all runners)

[INFO] You are using maven-soapui-extension-plugin 4.5.1.1
SoapUI Pro 4.5.1 Maven2 TestCase Runner

We should

  • not display soapui version when starting the runner but when displaying plugin version
  • also display build date and commit id
[INFO] You are using maven-soapui-extension-plugin 4.5.1.1 (c92693761816e569f4feefa06c38000fa46e7fb4; 2012-11-28 10:11:06.016 +0100)
[INFO] Soapui version: 4.5.1
SoapUI Pro Maven2 TestCase Runner

Implementation note: see #29
Commit id: short?

groovy.log destination directory should be configurable

Currently (at least from 3.5.1 to 4.0.1 version), this file is always generated in ${project.basedir} even if the "soapui.logroot" property is set (see #5 for a configuration example)

An issue is still opened for this (see http://sourceforge.net/tracker/index.php?func=detail&aid=2882169&group_id=136013&atid=737766) even if it seemed to have been fixed in the unreleased 3.6.2 version.
There is a workaround but again, you must do it in all projects (use a specific log4j configuration file)

Drop support for java 6

Even if SmartBear says that soapui 4.5.1 can be run with java 6:

  • the windows standalone distribution embedded a jre7 version
  • some bug only occurs when running with jre6 (see this bug when using ssl for instance)

So we could remove support of java6 build setting target to 1.7 when compiling the code.

add a test-verify goal

Currently, when running the "test" goal, we have 2 options:

  • by default, the build fails just after errors occur
  • if the "testFailIgnore" is set to true, the build does not fail after plugin execution but we do not have any way to easily know if there are errors

Usually, there is only a soapui project that stores the tests, so the first option is ok.
But when there are several projects, this is different.

Soapui currently does not support multi projects. The workaround with maven is to configure several executions.
See http://www.eviware.com/forum/viewtopic.php?f=14&t=12052 or http://www.soapui.org/forum/viewtopic.php?f=14&t=5381#p17979
In this case, we must set the "testFailIgnore" parameter to true to be sure that all projects are run but we cannot get the status of the runs.

To fix this, I propose to add a new "test-verify" goal that will check if there have been errors in previous test runs.
This means that at each runs, the "test" goal must set something in the maven project context to be used later by the "test-verify" goal (setting a property to true on errors seems to be ok)

[test goal] do not display details of errors

On error/failure, standard maven-soapui-plugin displays the details of the error, for instance, the request, the response, some logs.
This is very annoying when several tests fails: the console is flooded with those useless messages.
We already have the printReport parameter to get a summary of test execution and report files are also generated to know error causes .

So, remove these error details.

Add support for 3.6.1 version

My first private implementation has been done over soapui 3.6.1 version. The customer I worked for at that time would like to use the open source implementation to get rid of the private implementation (and also get new features now in maven-soapui-extension-plugin).

Soapui 3.6.1 requires java 5 (not Java 6) and does not work really well with Java 7 (see Soapui forum and soapui 4.5.0 release notes)

Update plugin artifactId to soapui-extension-maven-plugin

The current artifactId does not follow maven convention

[ERROR]`Artifact Ids of the format maven-___-plugin are reserved for
plugins in the Group Id org.apache.maven.plugins
Please change your artifactId to the format ___-maven-plugin
In the future this error will break the build.

The update could be done when

  • the following soapui pull request has been merged or implemented in another way
  • the new release of the plugin integrates the change

Be carreful, we need to document this change in the README/wiki. Expecially, document starting which version the modification applies.

[test goal] use maven logger when setting soapui property

Currently, use system out to log key/value.
Example

Setting soapui.scripting.library value /dev/maven-soapui-extension-plugin/target/it/groovy_log_directory/soapui-pro-4.0.0/../soapui-conf/groovy_scripts
Setting soapui.logroot value  /dev/maven-soapui-extension-plugin/target/it/groovy_log_directory/soapui-pro-4.0.0/target/soapui/logs

Should use the maven logger instead

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.