Skip to content

Commit

Permalink
[#121] add 'paramSuite' option to aet.sh script
Browse files Browse the repository at this point in the history
Updated CHANGELOG.md with created Pull Request
  • Loading branch information
tkaik committed Jul 11, 2018
1 parent 525eddf commit 07e931d
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Expand Up @@ -14,6 +14,7 @@ All notable changes to AET will be documented in this file.
- [PR-268](https://github.com/Cognifide/aet/pull/268) Bobcat upgrade to version 1.4.0
- [PR-279](https://github.com/Cognifide/aet/pull/279) Upgrade for some of libraries used by AET
- [PR-281](https://github.com/Cognifide/aet/pull/281) No version in Bundle names (simpler deployment)
- [PR-286](https://github.com/Cognifide/aet/pull/286) Shared Patterns - use latest patterns of given suite name ([#121](https://github.com/Cognifide/aet/issues/121))

## Version 2.1.6

Expand Down
1 change: 1 addition & 0 deletions client/client-scripts/README.md
Expand Up @@ -22,6 +22,7 @@ Usage:
Options:
-d --domain <DOMAIN> - Override domain attribute defined in suite file
-c --correlationId <CORRELATION_ID> - Set id of patterns to run test against
-p --patternSuite <SUITE_NAME> - Set the suite name to run test against its latest pattern (only used if -c is not set)
-i --interval <POLL_INTERVAL> - Set interval in seconds for polling suite status. Default interval : 1 sec
-w --waitForUnlock <TIMEOUT> - Set timeout for the script to wait for unlocked suite. Default timeout: 0 sec
-v --verbose - Make it more descriptive
Expand Down
10 changes: 9 additions & 1 deletion client/client-scripts/aet.sh
Expand Up @@ -23,6 +23,7 @@ SUITE_ENDPOINT="/suite"
DOMAIN_BODY=""
SUITE_NAME_BODY=""
CORRELATION_ID_BODY=""
PATTERN_SUITE_BODY=""
function usage {
echo
echo "AET Test executor"
Expand All @@ -35,6 +36,7 @@ function usage {
echo -e "\t-d --domain <DOMAIN> - Override domain attribute defined in suite file"
echo -e "\t-n --name <SUITE_NAME> - Override name attribute defined in suite file"
echo -e "\t-c --correlationId <CORRELATION_ID> - Set id of patterns to run test against."
echo -e "\t-p --patternSuite <SUITE_NAME> - Set the suite name to run test against its latest pattern (only used if -c is not set)"
echo -e "\t-i --interval <POLL_INTERVAL> - Set interval in seconds for polling suite status. Default interval : 1 sec."
echo -e "\t-w --waitForUnlock <TIMEOUT> - Set timeout for the script to wait for unlocked suite. Default timeout: 0 sec."
echo -e "\t-v --verbose - Make it more descriptive"
Expand Down Expand Up @@ -87,7 +89,7 @@ function process_locked_suite {

# request /suite endpoint
function start_suite {
run_response=$(curl -sw "%{http_code}" -F "suite=@$suite_file_name"$DOMAIN_BODY$SUITE_NAME_BODY$CORRELATION_ID_BODY "$endpoint$SUITE_ENDPOINT")
run_response=$(curl -sw "%{http_code}" -F "suite=@$suite_file_name"$DOMAIN_BODY$SUITE_NAME_BODY$CORRELATION_ID_BODY$PATTERN_SUITE_BODY "$endpoint$SUITE_ENDPOINT")
extract_code_and_body "$run_response"

if [ $code -eq 200 ]; then
Expand Down Expand Up @@ -131,6 +133,11 @@ while [[ $# -gt 0 ]]; do
CORRELATION_ID_BODY=" -F pattern=$CORRELATION_ID"
shift 2
;;
-p | --patternSuite )
PATTERN_SUITE=$2
PATTERN_SUITE_BODY=" -F patternSuite=$PATTERN_SUITE"
shift 2
;;
-v | --verbose )
VERBOSE=1
shift 1
Expand All @@ -148,6 +155,7 @@ if [[ $VERBOSE -eq 1 ]]; then
echo -e "\tOverridden domain: ${DOMAIN-not set}"
echo -e "\tOverridden suite name: ${SUITE_NAME-not set}"
echo -e "\tPattern id: ${CORRELATION_ID-not set}"
echo -e "\tPattern suite: ${PATTERN_SUITE-not set}"
echo ""
fi

Expand Down

0 comments on commit 07e931d

Please sign in to comment.