Codeship provides Basic and Pro.
- For Codeship Basic integration, read Load Testing on Codeship with Redline13 – it just makes sense.
With Basic you can run any command. Pro is a fully customizable Continuous Integration Platform with native Docker support.
To integrate with Codeship Pro we have used
- Encrypted environment variables
- Service definition in codeship-services.yml
- Build steps defined in codeship-steps.yml
1 – Make your RedLine13 API Key available as an encrypted environment variable
- Get your RedLine13 API Key
- Convert to encrypted file – Encrypting environment variables
- This will need to be included in your code repo
2 – Define your codeship-services.yml definition for RedLine13
redline13: image: redline13/codeship:latest volumes: - ./:/test environment: TIMEOUT: 900 SUCCESS_RATE: 80 RESPONSE_TIME: 5000 encrypted_env_file: env.encrypted
- encyrpted_env_file – name of where encrypted environment variables are stored
- environment: Other environment variables not encrypted
- TIMEOUT – How long to wait for your test to run
- SUCCESS_RATE – Percent of tests that must complete success for build to pass
- RESPONSE_TIME – Average response time must be less than this for build
3 – Define your codeship-steps.yml to execute the redline13 codeship service.
- name: run_my_load_test service: redline13 command: > curl -s https://www.redline13.com/Api/LoadTest -H \"X-Redline-Auth: ${REDLINE_API_KEY}\" -F testType=jmeter-test -F name=\"CodeShipAndRedLine13\" -F version=3.1 -F jvm_args= -F opts= -F numServers=2 -F \"file=@/test/tests/Plexify.jmx\" -F storeOutput=true -F servers[0][location]=us-east-1 -F servers[0][size]=m3.medium -F servers[0][num]=2 -F servers[0][associatePublicIpAddress]=false -F servers[0][securityGroupIds]= -F servers[0][subnetId]= -F servers[0][onDemand]=true -F servers[0][volumeSize]= -F servers[0][usersPerServer]=1
- You can customize the load test as based on the RedLine13 API Documentation.
- You can export from existing load tests to generate the scripts above and copy them into Codeship.
4. Here is what it looks like in Codeship when your job builds
- The load test results and graphs are available on the RedLine13 test report page.
Happy testing.
Read more about Redline13.
1 Comment
Comments are closed.