|
|
## Integration Tests
|
|
|
|
|
|
To run integration test for an API client or server stub, 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
|
|
|
|
|
|
| *CI* | *Config* | *Tests covered* |
|
|
|
|------|----------|-----------------|
|
|
|
| Travis | [.travis.yml](https://github.com/openapitools/openapi-generator/blob/master/.travis.yml) | Ruby, Swift, Swift3, JavaScript, Python,TypeScript, Go |
|
|
|
| Shippable | [shippable.yml](https://github.com/openapitools/openapi-generator/blob/master/shippable.yml) | Mustache templates, Elixir |
|
|
|
| AppVeyor | [appveyor.yml](https://github.com/openapitools/openapi-generator/blob/master/appveyor.yml) | C# (clients)|
|
|
|
| CircleCI | [circle.yml](https://github.com/openapitools/openapi-generator/blob/master/circle.yml) | Clojure, Java (clients, servers), Scala, Kotlin with JDK7, JDK8 |
|
|
|
|
|
|
|
|
|
## 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.
|
|
|
|
|
|
- [artifactId](https://github.com/openapitools/openapi-generator/blob/master/samples/client/petstore/ruby/pom.xml#L4) must be unique
|
|
|
- use [exec-maven-plugin](https://github.com/openapitools/openapi-generator/blob/master/samples/client/petstore/ruby/pom.xml#L24-L59) to execute commmands (bundle install --path vendor/bundle, bundle exec rspec)
|
|
|
|
|
|
To test it locally, please run `mvn integration-test`
|
|
|
|
|
|
**2. Update root-level pom.xml to include the new directory**
|
|
|
|
|
|
For Java-related samples, please update [pom.xml.circleci](https://github.com/openapitools/openapi-generator/blob/master/pom.xml.circleci)
|
|
|
|
|
|
For others (non-Java), please update [pom.xml](https://github.com/openapitools/openapi-generator/blob/master/pom.xml) instead.
|
|
|
|
|
|
e.g. For Ruby samples, we add it to [pom.xml Line 821](https://github.com/openapitools/openapi-generator/blob/master/pom.xml#L821) |
|
|
\ No newline at end of file |