diff --git a/CHANGELOG.md b/CHANGELOG.md index 213296d13..fa0cfa57b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,7 @@ All notable changes to AET will be documented in this file. **List of changes that are finished but not yet released in any final version.** - [PR-439](https://github.com/Cognifide/aet/pull/439) Fixed duplicating line and column numbers in accessibility tab - [PR-360](https://github.com/Cognifide/aet/pull/360) Keyboard shortcuts for 'Accept/Revert url/test' buttons ([#317](https://github.com/Cognifide/aet/issues/317)) +- [PR-432](https://github.com/Cognifide/aet/pull/432) Fixed issue with lack of clear message for erroneous suite definition. ## Version 3.2.0 diff --git a/client/client-scripts/aet.sh b/client/client-scripts/aet.sh index 9abc7ea6d..0607705aa 100755 --- a/client/client-scripts/aet.sh +++ b/client/client-scripts/aet.sh @@ -81,8 +81,9 @@ function process_locked_suite { ((UNLOCK_TIMEOUT-=5)) start_suite else - echo "Unsuccessful Request to \"$endpoint$SUITE_ENDPOINT\", status: $code - $body" + errorMessage=$(echo $body | jq -r ".errorMessage") + echo "Unsuccessful Request to \"$endpoint$SUITE_ENDPOINT\", status: $code, error: +$errorMessage" exit 1 fi } @@ -196,4 +197,4 @@ while $process_status; do $body" exit 1 fi -done +done \ No newline at end of file diff --git a/test-executor/src/main/java/com/cognifide/aet/executor/SuiteServlet.java b/test-executor/src/main/java/com/cognifide/aet/executor/SuiteServlet.java index ef4d8e0db..1c32995dd 100644 --- a/test-executor/src/main/java/com/cognifide/aet/executor/SuiteServlet.java +++ b/test-executor/src/main/java/com/cognifide/aet/executor/SuiteServlet.java @@ -91,15 +91,10 @@ protected void doPost(HttpServletRequest request, HttpServletResponse response) String responseBody = gson.toJson(suiteExecutionResult); - if (resultWrapper.hasError()) { - response.sendError(resultWrapper.getStatusCode(), - suiteExecutionResult.getErrorMessage()); - } else { - response.setStatus(HttpStatus.SC_OK); - response.setContentType("application/json"); - response.setCharacterEncoding(CharEncoding.UTF_8); - response.getWriter().write(responseBody); - } + response.setStatus(resultWrapper.getStatusCode()); + response.setContentType("application/json"); + response.setCharacterEncoding(CharEncoding.UTF_8); + response.getWriter().write(responseBody); } else { response.sendError(HttpStatus.SC_BAD_REQUEST, "Request does not contain the test suite"); }