jenkinsci / gogs-webhook-plugin

Jenkins Gogs Webhook
https://plugins.jenkins.io/gogs-webhook/
MIT License
79 stars 42 forks source link

Add integration tests #27

Closed jmMeessen closed 6 years ago

jmMeessen commented 7 years ago

I propose with this pull request to add automated integration tests.

The verify phase will start a local docker environment composed of a Jenkins and a Gogs server during the pre-integration-test. The plugin under development as well as all necessary plugins are pre-loaded in the docker container. No security is set on the Jenkins server. The Gogs server is configured with a user called "butler" and password "butler". The credentials are pre-loaded in the Jenkins server.

The tests, running with Failsafe, are located in the Webhook_IT.java class.

As the Integration tests are still experimental, they are grouped under a dedicated profile called withIntegrationTest. To compile the project with the integration tests execute mvn clean install -P withIntegrationTest.

Detailed explanations are available in the about_integration_tests.md.

While I am working to improve these tests, all comments are welcome.

jmMeessen commented 6 years ago

@sanderv32 Hello, Alexander. This PR has been reviewed (by me) and documented. It is now ready to be merged.

With this first step merged, we could start improving test coverage and integrating the other enhancement proposals.

/- Jmm

sanderv32 commented 6 years ago

Merged the PR.

sanderv32 commented 6 years ago

@jmMeessen Included the integration tests in the Travis-CI build. Thanks for your great work!