Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Current »

The plugin contains integration level tests tied to Maven's verify stage. These tests cover all existing functionality as the time of build.

 

 

Exploratory/Ad-hoc testing

To explore or test new features I suggest Atlassian's RAB for exploratory testing.


Scripted / Regression testing

I recommend Resty, its lightweight and easy - https://github.com/micha/resty

 

#!/bin/bash
 
#update these as needed, or pass as arguments
domain=${1:-YOURDOMAIN.com}
user=userguy
password=secrets
agentId=81756161
 
 
 
#this tests most functionality, and can be customized as needed

#install and source resty
curl -L http://github.com/micha/resty/raw/master/resty > resty
. resty

#now do it!
resty "https://${domain}/builds" -k -H "Accept: application/json" -H "Content-Type: application/json" -u $username:$password
echo "creating new token"
muuid=`POST /rest/agent/latest/tokens '{"name":"doitall","read":"true","change":"true"}' | cut -d\" -f 4`
echo "returned UUID: $uuid"

echo "show lists of tokens"
GET /rest/agent/latest/tokens >/dev/null
echo "dropping to anymous user and hitting homepage to get cookie"
resty "https://${domain}/builds" -kL >/dev/null
GET / -j >/dev/null
echo "use token to get agent state @ /rest/agent/latest/${agentId}?uuid=${muuid}"
GET /rest/agent/latest/81756161?uuid=${muuid} -Q >/dev/null
echo "disable agent"
POST /rest/agent/latest/81756161/disable?uuid=${muuid} -Q >/dev/null
echo "enable agent"
POST /rest/agent/latest/81756161/disable?uuid=${muuid} -Q >/dev/null
echo "All dones. You should see no warnings our errors above, only info ttext."

 

 

 

 

  • No labels