Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • O openapi-generator
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 3,476
    • Issues 3,476
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 402
    • Merge requests 402
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • OpenAPI Tools
  • openapi-generator
  • Wiki
  • Integration Tests

Integration Tests · Changes

Page history
Initial Wiki authored May 13, 2018 by Jeremie Bresson's avatar Jeremie Bresson
Show whitespace changes
Inline Side-by-side
Integration-Tests.md 0 → 100644
View page @ 016d8b1b
## 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
Clone repository
  • API client generator HOWTO
  • Building your own Templates
  • Customizing client code generation
  • FAQ
  • Git Branches
  • Home
  • How to add a generator for a new language or framework
  • Integration Tests
  • Migration Guide
  • Mustache Template Variables
  • Pull Request Checklist
  • Release Checklist
  • Samples folder
  • Server stub generator HOWTO
  • Vendor Extensions
View All Pages