Upload files to "/"
This commit is contained in:
1179
package-lock.json
generated
Normal file
1179
package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load Diff
14
package.json
Normal file
14
package.json
Normal file
@@ -0,0 +1,14 @@
|
||||
{
|
||||
"name": "mocha",
|
||||
"private": true,
|
||||
"version": "1.0.0",
|
||||
"scripts": {
|
||||
"test": "mocha --parallel"
|
||||
},
|
||||
"devDependencies": {
|
||||
"allure-js-commons": "^3.0.6",
|
||||
"allure-mocha": "^3.0.6",
|
||||
"mocha": "^10.8.2",
|
||||
"selenium-webdriver": "^4.40.0"
|
||||
}
|
||||
}
|
||||
81
run.bat
Normal file
81
run.bat
Normal file
@@ -0,0 +1,81 @@
|
||||
@echo off
|
||||
setlocal enabledelayedexpansion
|
||||
|
||||
REM ============================
|
||||
REM QKF – Full Test Runner
|
||||
REM ============================
|
||||
|
||||
echo.
|
||||
echo ============================
|
||||
echo QKF Test Execution
|
||||
echo ============================
|
||||
echo.
|
||||
|
||||
REM --- Config (edit if needed) ---
|
||||
set QKF_BROWSER=chrome
|
||||
set QKF_HEADLESS=true
|
||||
set QKF_TEST_TIMEOUT_MS=120000
|
||||
set QKF_BASE_URL=http://gitea.cloud.qacg/user/login
|
||||
|
||||
REM --- Paths ---
|
||||
set FEATURES_DIR=features
|
||||
set GENERATED_DIR=test\generated
|
||||
set ALLURE_RESULTS=allure-results
|
||||
set ALLURE_REPORT=allure-report
|
||||
|
||||
REM --- Clean previous output ---
|
||||
if exist "%GENERATED_DIR%" (
|
||||
echo Cleaning generated specs...
|
||||
rmdir /s /q "%GENERATED_DIR%"
|
||||
)
|
||||
|
||||
if exist "%ALLURE_RESULTS%" (
|
||||
echo Cleaning Allure results...
|
||||
rmdir /s /q "%ALLURE_RESULTS%"
|
||||
)
|
||||
|
||||
if exist "%ALLURE_REPORT%" (
|
||||
echo Cleaning Allure report...
|
||||
rmdir /s /q "%ALLURE_REPORT%"
|
||||
)
|
||||
|
||||
REM --- Generate specs ---
|
||||
echo.
|
||||
echo [1/3] Generating specs from Gherkin...
|
||||
node scripts\transform.js --features "%FEATURES_DIR%" --verbose
|
||||
|
||||
if errorlevel 1 (
|
||||
echo ❌ Spec generation failed
|
||||
exit /b 1
|
||||
)
|
||||
|
||||
REM --- Run tests ---
|
||||
echo.
|
||||
echo [2/3] Running Mocha + Selenium + Allure...
|
||||
npx mocha ^
|
||||
--timeout %QKF_TEST_TIMEOUT_MS% ^
|
||||
--reporter allure-mocha ^
|
||||
"%GENERATED_DIR%\*.spec.js"
|
||||
|
||||
if errorlevel 1 (
|
||||
echo ⚠️ Tests finished with failures (continuing to report generation)
|
||||
)
|
||||
|
||||
REM --- Generate Allure report ---
|
||||
echo.
|
||||
echo [3/3] Generating Allure report...
|
||||
allure generate "%ALLURE_RESULTS%" -o "%ALLURE_REPORT%" --clean
|
||||
|
||||
if errorlevel 1 (
|
||||
echo ❌ Allure report generation failed
|
||||
exit /b 1
|
||||
)
|
||||
|
||||
REM --- Open report ---
|
||||
echo.
|
||||
echo Opening Allure report...
|
||||
allure open "%ALLURE_REPORT%"
|
||||
|
||||
echo.
|
||||
echo ✅ Done.
|
||||
endlocal
|
||||
Reference in New Issue
Block a user