tm-playwright-framework
Version:
Playwright Cucumber TS framework - The easiest way to learn
92 lines (85 loc) • 11.1 kB
HTML
<html>
<head>
<title>CCS - Playwright Automation</title>
</head>
<body>
<h1>Either environment is not specified or specified with the unsupported environment. Please check</h1>
<br>
<h2>## Running Cucumber Test through Terminal (Command Prompt)</h2>
<p><b>SYNTAX: </b><font size=5 color="blue"><b>npm run ccs_cucumber_test -- ENV={Env} [--FEATURES={Feature}] [--TAGS={tags}] [--BROWSER=<browser>] [--HEADLESS={true/false}] [--CLIENT={client}] [--REPORT_PATH={report_path}] [--PARALLEL_WORKER={Parallel_Worker_Count}></div></b></font></p>
<p style="text-indent: 30px"><i>- ENV is mandatory (required) argument. Value can be any one of the following: dev, test, qa, stage, ct, uat, prod</i></p>
<p style="text-indent: 30px"><i>- If no FEATURES are specified then it will run all features</i></p>
<p style="text-indent: 30px"><i>- If no TAGS are specified then it will run all scenarios of applicable features irrespective of tag</i></p>
<p style="text-indent: 30px"><i>- If no BROWSER is specified then default would be Chrome. Value can be only Chrome or Firefox or Webkit</i></p>
<p style="text-indent: 30px"><i>- If HEADLESS parameter is not specified then default would be Headless as false</i></p>
<p style="text-indent: 30px"><i>- If REPORT_PATH parameter is specified then default Cucumber report HTML and JSON files will be generated in the specified folder</i></p>
<p style="text-indent: 30px"><i>- If PARALLEL_WORKER parameter is specified then given number of parallel execution will happen. Otherwise it will be defaulted to 1</i></p></br>
<p>- The following will not work as ENV is mandatory</p>
<p style="text-indent: 30px"><b><i>npm run ccs_cucumber_test</b></i></p></br>
<p>- To execute all of the features with PROD environment variables with Chrome browser</p>
<p style="text-indent: 30px"><b><i>npm run ccs_cucumber_test -- --ENV=PROD</b></i></p> </br>
<p>- To execute all of the features under loginPage folder with PROD environment variables with Chrome browser</p>
<p style="text-indent: 30px"><b><i>npm run ccs_cucumber_test -- --ENV=PROD --FEATURES=app/test/features/loginPage</b></i></p></br>
<p>- To execute all of the features under loginPage and booksPage folder with PROD environment variables with Chrome browser</p>
<p style="text-indent: 30px"><b><i> npm run ccs_cucumber_test -- --ENV=PROD --FEATURES=app/test/features/loginPage,app/test/features/booksPage</b></i></p></br>
<p>- To execute all of the features under loginPage folder which are tagged as @auth with PROD environment variables with Chrome browser</p>
<p style="text-indent: 30px"><b><i>npm run ccs_cucumber_test -- --ENV=PROD --FEATURES=app/test/features/loginPage --TAGS="@auth" </b></i></p></br>
<p>- To execute all of the features which are tagged as @auth with PROD environment variables with Chrome browser</p>
<p style="text-indent: 30px"><b><i>npm run ccs_cucumber_test -- --ENV=PROD --TAGS="@auth" </b></i></p></br>
<p>- To execute all of the features which are tagged as @auth or @add with PROD environment variables with Chrome browser</p>
<p style="text-indent: 30px"><b><i>npm run ccs_cucumber_test -- --ENV=PROD --TAGS="@auth or @add" </b></i></p></br>
<p> - To execute all of the features which are not tagged as @auth with PROD environment variables with Chrome browser</p>
<p style="text-indent: 30px"><b><i>npm run ccs_cucumber_test -- --ENV=PROD --FEATURES=app/test/features/loginPage --TAGS="not @auth" </b></i></p></br>
<p>- To execute all of the features with PROD environment variables with Firefox</p>
<p style="text-indent: 30px"><b><i>npm run ccs_cucumber_test -- --ENV=PROD --BROWSER=Firefox</b></i></p></br>
<p>- To execute all of the features with PROD environment variables with Webkit</p>
<p style="text-indent: 30px"><b><i>npm run ccs_cucumber_test -- --ENV=PROD --BROWSER=Webkit</b></i></p></br>
<p> - To execute all of the features with PROD environment variables with browser as Headless</p>
<p style="text-indent: 30px"><b><i>npm run ccs_cucumber_test -- --ENV=PROD --BROWSER=Webkit --HEADLESS=true</b></i></p></br>
<p> - To execute all of the features with PROD environment variables with browser as Headless and to generate the Report at downloads folder</p>
<p style="text-indent: 30px"><b><i>npm run ccs_cucumber_test -- --ENV=PROD --BROWSER=Webkit --HEADLESS=true --REPORT_PATH=C:/users/Test/Downloads</b></i></p></br>
<p> - To execute all of the features with PROD environment variables with browser as Headless in Parallel mode</p>
<p style="text-indent: 30px"><b><i>npm run ccs_cucumber_test -- --ENV=PROD --BROWSER=Webkit --HEADLESS=true --PARALLEL_WORKER=2</b></i></p></br>
</pre>
<br>
<h2>## Running Playwright Test through Terminal (Command Prompt)</h2>
<p><b>SYNTAX:</b><font size=5 color="blue"><b> npm run ccs_playwright_test -- ENV={Env} [--TEST_DIR={test_dir}] [--TAGS={tags}] [--BROWSER=<browser>] [--HEADLESS={true/false}] [--CLIENT={client}] [--REPORT_PATH={report_path}] [--PARALLEL_WORKER={Parallel_Worker_Count}> [RETRY_COUNT={retry_count}] [REPEAT_EACH={repeat_each}] [REPORTER={reporter}] [TIME_OUT={timetout}]</div></b></font></p>
<p style="text-indent: 30px"><i>- ENV is mandatory (required) argument. Value can be any one of the following: dev, test, qa, stage, ct, uat, prod</i></p>
<p style="text-indent: 30px"><i>- If no FEATURES are specified then it will run all features</i></p>
<p style="text-indent: 30px"><i>- If no TAGS are specified then it will run all scenarios of applicable features irrespective of tag</i></p>
<p style="text-indent: 30px"><i>- If no BROWSER is specified then default would be Chrome. Value can be only Chrome or Firefox or Webkit</i></p>
<p style="text-indent: 30px"><i>- If HEADLESS parameter is not specified then default would be Headless as false</i></p>
<p style="text-indent: 30px"><i>- If REPORT_PATH parameter is specified then default Cucumber report HTML and JSON files will be generated in the specified folder</i></p>
<p style="text-indent: 30px"><i>- If PARALLEL_WORKER parameter is specified then given number of parallel execution will happen. Otherwise it will be defaulted to 1</i></p>
<p style="text-indent: 30px"><i>- If REPEAT_EACH parameter is not specified then default would be 1. If specified then every tests will run given no. of times</i></p>
<p style="text-indent: 30px"><i>- If RETRY_COUNT parameter is not specified then default would be 1. If specified then given number of times failed tests will be re-executed</i></p>
<p style="text-indent: 30px"><i>- If TIME_OUT parameter is not specified then default would be 1. If specified then given timetout value is utilized for each tests</i></p></br>
<p>- The following will not work as ENV is mandatory</p>
<p style="text-indent: 30px"><b><i>npm run ccs_playwright_test</b></i></p></br>
<p>- To execute all of the features with PROD environment variables with Chrome browser</p>
<p style="text-indent: 30px"><b><i>npm run ccs_playwright_test -- --ENV=PROD</b></i></p> </br>
<p>- To execute all of the features under loginPage folder with PROD environment variables with Chrome browser</p>
<p style="text-indent: 30px"><b><i>npm run ccs_playwright_test -- --ENV=PROD --FEATURES=app/test/features/loginPage</b></i></p></br>
<p>- To execute all of the features under loginPage and booksPage folder with PROD environment variables with Chrome browser</p>
<p style="text-indent: 30px"><b><i> npm run ccs_playwright_test -- --ENV=PROD --FEATURES=app/test/features/loginPage,app/test/features/booksPage</b></i></p></br>
<p>- To execute all of the features under loginPage folder which are tagged as @auth with PROD environment variables with Chrome browser</p>
<p style="text-indent: 30px"><b><i>npm run ccs_playwright_test -- --ENV=PROD --FEATURES=app/test/features/loginPage --TAGS="@auth" </b></i></p></br>
<p>- To execute all of the features which are tagged as @auth with PROD environment variables with Chrome browser</p>
<p style="text-indent: 30px"><b><i>npm run ccs_playwright_test -- --ENV=PROD --TAGS="@auth" </b></i></p></br>
<p>- To execute all of the features which are tagged as @auth or @add with PROD environment variables with Chrome browser</p>
<p style="text-indent: 30px"><b><i>npm run ccs_playwright_test -- --ENV=PROD --TAGS="@auth|@add" </b></i></p></br>
<p> - To execute all of the features which are not tagged as @auth with PROD environment variables with Chrome browser</p>
<p style="text-indent: 30px"><b><i>npm run ccs_playwright_test -- --ENV=PROD --FEATURES=app/test/features/loginPage --TAGS="'^(?!.*@myTag).*'" </b></i></p></br>
<p>- To execute all of the features with PROD environment variables with Firefox</p>
<p style="text-indent: 30px"><b><i>npm run ccs_playwright_test -- --ENV=PROD --BROWSER=Firefox</b></i></p></br>
<p>- To execute all of the features with PROD environment variables with Webkit</p>
<p style="text-indent: 30px"><b><i>npm run ccs_playwright_test -- --ENV=PROD --BROWSER=Webkit</b></i></p></br>
<p> - To execute all of the features with PROD environment variables with browser as Headless</p>
<p style="text-indent: 30px"><b><i>npm run ccs_playwright_test -- --ENV=PROD --BROWSER=Webkit --HEADLESS=true</b></i></p></br>
<p> - To execute all of the features with PROD environment variables with browser as Headless and to generate the Report at downloads folder</p>
<p style="text-indent: 30px"><b><i>npm run ccs_playwright_test -- --ENV=PROD --BROWSER=Webkit --HEADLESS=true --REPORT_PATH=C:/users/Test/Downloads</b></i></p></br>
<p> - To execute all of the features with PROD environment variables with browser as Headless in Parallel mode</p>
<p style="text-indent: 30px"><b><i>npm run ccs_playwright_test -- --ENV=PROD --BROWSER=Webkit --HEADLESS=true --PARALLEL_WORKER=2</b></i></p></br>
</pre>
</body>
</html>