From 59ce5ccaa9af330c9395e9bf5e063d536574dbcf Mon Sep 17 00:00:00 2001 From: aaron <462826@qq.com> Date: Thu, 14 Jul 2022 15:19:44 +0800 Subject: [PATCH] support Playwright and Puppeteer --- ui/src/utils/const.ts | 10 +++++----- ui/src/utils/testing.ts | 4 ++++ 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/ui/src/utils/const.ts b/ui/src/utils/const.ts index b1736443..070d29b7 100644 --- a/ui/src/utils/const.ts +++ b/ui/src/utils/const.ts @@ -104,7 +104,7 @@ export const unitTestTypesDef = [ { label: 'GTest', value: 'gtest', - cmd: 'ztf gtest -p product_id ./build/bin/unit_tests --gtest_output=xml:testresults.xml', + cmd: 'ztf gtest -p product_id ./build/bin/unit_tests --gtest_output=xml:testresults.xml', }, { label: 'QTest', @@ -114,22 +114,22 @@ export const unitTestTypesDef = [ { label: 'CppUnit', value: 'cppunit', - cmd: ' ztf cppunit -p product_id ./MathTest', + cmd: 'ztf cppunit -p product_id ./MathTest', }, { label: 'Cypress', value: 'cypress', - cmd: ' ztf cypress -p product_id --verbose yarn cypress:run --spec "cypress/integration/test/baidu.spec.js" --reporter junit --reporter-options "mochaFile=results/test_output.xml,toConsole=true"', + cmd: 'ztf cypress -p product_id --verbose yarn cypress:run --spec "cypress/integration/test/baidu.spec.js" --reporter junit --reporter-options "mochaFile=results/test_output.xml,toConsole=true"', }, { label: 'Playwright', value: 'playwright', - cmd: ' ztf playwright -p product_id PLAYWRIGHT_JUNIT_OUTPUT_NAME=testresults.xml npx playwright test --project=chromium --headed --reporter=junit', + cmd: 'ztf playwright -p product_id PLAYWRIGHT_JUNIT_OUTPUT_NAME=results/testresults.xml npx playwright test --project=chromium --headed --reporter=junit', }, { label: 'Puppeteer', value: 'puppeteer', - cmd: ' ztf puppeteer -p product_id mocha tests/example.js --reporter xunit --reporter-options output=results/testresults.xml -t 30000', + cmd: 'ztf puppeteer -p product_id mocha tests/example.js --reporter xunit --reporter-options output=results/testresults.xml -t 30000', }, ] diff --git a/ui/src/utils/testing.ts b/ui/src/utils/testing.ts index 13e65535..007e2577 100644 --- a/ui/src/utils/testing.ts +++ b/ui/src/utils/testing.ts @@ -60,6 +60,10 @@ export const testToolMap = { robotframework: 'RobotFramework', cypress: 'Cypress', + + playwright: 'Playwright', + puppeteer: 'Puppeteer', + autoit: 'AutoIt', selenium: 'Selenium', appium: 'Appium', -- GitLab