Skip to content

Integration Tests

Sebastien Rosset (serosset) edited this page Mar 9, 2020 · 2 revisions

Integration Tests

To run integration test for an API client or server stub in your local workspace, go to the sample directory which contains pom.xml and then run mvn integration-test.

To identify API client or server stub tests with pom.xml, run find samples -name "pom.xml" under Mac/Linux.

Continuous Integration

The OpenAPITools Continuous Integration process uses multiple CI tools and configuration files as shown in the table below. When you submit a Pull Request, the CI tools execute the integration tests as specified in their respective configuration file.

CI Config Tests covered
Travis .travis.yml RubyJavaScript, PHP, Python, TypeScript, Haskell, C++, Elm, Groovy, etc
Shippable shippable.yml Mustache templates, Elixir, Erlang (client, server), Kotlin, etc
AppVeyor appveyor.yml C# (clients)
CircleCI circle.yml Go, TypeScript Angular6, Clojure, Java (clients, servers), Scala, Kotlin with JDK7, JDK8, etc
drone.io .drone.yml JDK11 test, OCaml client, etc
bitrise.io bitrise.yml Swift 4, 5

How to add integration tests for new Petstore samples?

1. Create pom.xml in the sample directory

Let's say the new sample folder is openapi-generator/samples/client/petstore/ruby/. We will need to create pom.xml used by Maven to execute commands for testing the Ruby Petstore client.

To test it locally, please run mvn integration-test

2. Update root-level pom.xml to include the new directory

Please update pom.xml.

For example, search for "ruby" in pom.xml to see how the Ruby petstore folder is added.