Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove report.html and use cli tool instead #59

Merged
merged 1 commit into from
Sep 11, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 1 addition & 20 deletions testing_suite/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,6 @@ if ! command -v newman &> /dev/null; then
npm install -g newman
fi

if ! command -v newman-reporter-htmlextra &> /dev/null; then
echo "newman-reporter-htmlextra is not found. Installing..."
npm install -g newman-reporter-htmlextra
fi


# Inform the user that the process may take some time
cat << "EOF"

Expand Down Expand Up @@ -52,23 +46,10 @@ EOF
newman run https://raw.githubusercontent.com/e2b-dev/agent-protocol/main/testing_suite/contract_tests.json \
-e https://raw.githubusercontent.com/e2b-dev/agent-protocol/main/testing_suite/contract_tests_env.json \
--env-var "env-openapi-json-url=https://raw.githubusercontent.com/e2b-dev/agent-protocol/main/schemas/openapi.json" \
-r htmlextra \
--env-var "env-server=Test server" \
-r htmlextra \
--reporter-htmlextra-export report.html \
--reporter-htmlextra-title "Agent Protocol Contract Testing"
--env-var "env-server=Test server"

agent_protocol_contract_testing_results=$?


if [[ "$OSTYPE" == "darwin"* ]]; then
opener="open"
elif [[ "$OSTYPE" == "linux-gnu"* ]]; then
opener="xdg-open"
fi

$opener report.html || echo "couldn't open the report. You can open it yourself in your favorite browser. The report is located in the current directory and named report.html"

if [[ $agent_protocol_tests_results -ne 0 ]] || [[ $agent_protocol_contract_testing_results -ne 0 ]]; then
exit 1
else
Expand Down