Skip to content
Merged
Show file tree
Hide file tree
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
19 changes: 19 additions & 0 deletions run_api.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
@echo off
REM One-click API test runner
set REPORT_DIR=.\Reports\api-results
set OUTPUT_DIR=.\Reports\api-report

echo === Running API Tests ===
pytest API_Automation/cases -v --alluredir="%REPORT_DIR%"
if errorlevel 1 goto :error

echo === Generating Allure Report ===
allure generate "%REPORT_DIR%" -o "%OUTPUT_DIR%" --clean
allure open "%OUTPUT_DIR%"
goto :end

:error
echo Tests failed.
exit /b 1

:end
13 changes: 13 additions & 0 deletions run_api.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/bin/bash
# One-click API test runner
set -e

REPORT_DIR="./Reports/api-results"
OUTPUT_DIR="./Reports/api-report"

echo "=== Running API Tests ==="
pytest API_Automation/cases -v --alluredir="$REPORT_DIR"

echo "=== Generating Allure Report ==="
allure generate "$REPORT_DIR" -o "$OUTPUT_DIR" --clean
allure open "$OUTPUT_DIR"
21 changes: 21 additions & 0 deletions run_ui.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
@echo off
REM One-click UI test runner (requires Appium + device/simulator)
set REPORT_DIR=.\Reports\ui-results
set OUTPUT_DIR=.\Reports\ui-report

echo === Starting Appium Server ===
start /b appium
timeout /t 3 /nobreak >nul

echo === Running UI Tests ===
pytest UI_Automation/Tests -v -n 0 --alluredir="%REPORT_DIR%"
set EXIT_CODE=%errorlevel%

echo === Stopping Appium Server ===
taskkill /f /im node.exe >nul 2>&1

echo === Generating Allure Report ===
allure generate "%REPORT_DIR%" -o "%OUTPUT_DIR%" --clean
allure open "%OUTPUT_DIR%"

exit /b %EXIT_CODE%
24 changes: 24 additions & 0 deletions run_ui.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#!/bin/bash
# One-click UI test runner (requires Appium + device/simulator)
set -e

REPORT_DIR="./Reports/ui-results"
OUTPUT_DIR="./Reports/ui-report"

echo "=== Starting Appium Server ==="
appium &
APPIUM_PID=$!
sleep 3

echo "=== Running UI Tests ==="
pytest UI_Automation/Tests -v -n 0 --alluredir="$REPORT_DIR"
EXIT_CODE=$?

echo "=== Stopping Appium Server ==="
kill $APPIUM_PID

echo "=== Generating Allure Report ==="
allure generate "$REPORT_DIR" -o "$OUTPUT_DIR" --clean
allure open "$OUTPUT_DIR"

exit $EXIT_CODE
Loading