Skip to content

Commit c763a6e

Browse files
test: project setup
0 parents  commit c763a6e

File tree

8 files changed

+2183
-0
lines changed

8 files changed

+2183
-0
lines changed

.github/workflows/playwright.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Playwright Tests
2+
on:
3+
push:
4+
branches: [ main, master ]
5+
pull_request:
6+
branches: [ main, master ]
7+
jobs:
8+
test:
9+
timeout-minutes: 60
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v2
13+
- uses: actions/setup-node@v2
14+
with:
15+
node-version: '16.x'
16+
- name: Install Playwright
17+
run: npx playwright install --with-deps
18+
- name: Run Playwright tests
19+
run: npx playwright test
20+
- uses: actions/upload-artifact@v2
21+
if: always()
22+
with:
23+
name: playwright-test-results
24+
path: test-results/
25+
- name: Publish JUnit Report
26+
uses: mikepenz/action-junit-report@v2
27+
if: always() # always run even if the previous step fails
28+
with:
29+
report_paths: 'junit-results/*.xml'

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
node_modules/
2+
*-results/
3+
playwright-report/
4+
allure*

README.md

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
<h1 dir="auto"><a class="anchor" aria-hidden="true" href="https://playwright.dev/"><svg class="octicon octicon-link" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path fill-rule="evenodd"></path></svg></a><g-emoji class="g-emoji" alias="performing_arts" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/1f3ad.png">🎭</g-emoji> Playwright</h1>
2+
3+
# Web Test Automation - Playwright
4+
## Starter project creado en vivo en [stream de Twitch](https://www.twitch.tv/charlyautomatiza) basado en [Playwright](https://playwright.dev/), [TypeScript](https://www.typescriptlang.org/), [Allure Report](https://docs.qameta.io/allure-report/).
5+
Podrás acceder mi canal de [YouTube](https://www.youtube.com/channel/UCwEb6xrQtQCEuN_gNgi_Xfg) para mayor información sobre este y otros frameworks de pruebas automatizadas.
6+
7+
### Requerimientos generales
8+
9+
- Instalar [Node.js](https://nodejs.org/es/download/)
10+
- Instalar algún cliente git como por ejemplo [git bash](https://git-scm.com/downloads)
11+
- Java Development Kit [(JDK)](https://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133155.html)
12+
- Asegurarse de tener configurada la variable de entorno **JAVA_HOME** con la ruta de la JDK respectiva **(Necesario para la generación del reporte de Allure)**.
13+
14+
### Instalación del framework de pruebas
15+
16+
**Clonar el repositorio:**
17+
18+
git clone https://github.com/charlyautomatiza/starter-playwright.git
19+
20+
**Instalar las dependencias.**
21+
22+
npm install
23+
24+
**Para la ejecución de todos test en todos los browsers en modo headless**
25+
26+
npm run test
27+
28+
**Para la ejecución de todos test en todos los browsers**
29+
30+
npm run test-head
31+
32+
**Para la ejecución solamente en Firefox**
33+
34+
npm run firefox
35+
36+
**Para la ejecución solamente en Chromium**
37+
38+
npm run chromium
39+
40+
**Para la ejecución solamente en Webkit**
41+
42+
npm run webkit
43+
44+
**Para abrir el reporte Html de Playwright unificado de los resultados de los test**
45+
46+
npm run play-report
47+
48+
**Para crear y abrir el reporte de Allure unificado de los resultados de los test**
49+
50+
npm run allure-report
51+

0 commit comments

Comments
 (0)