Hola hola, la clase #12 “Debugging con API logs” redireciona al landing page del curso
Fundamentos
Hola mundo con Playwright
Instalación de Playwright
Cualquiera puede escribir tests
Ejecuta tus tests
Estructura de un test
Selectores
Más sobre selectores
Assertions
Reto #1
Información importante para resolver el reto
Reto: escribe un test sin el uso de codegen
Debug de un test
Playwright inspector
Debugging selectors
Debugging con API logs
Playwright Tracing
Reto #2
Reparar un test que no funciona
Leyendo errores de ejecución de un test
Resolviendo errores con la ayuda del inspector
Recomendaciones finales
Recomendaciones para mejorar tus test
You don't have access to this class
Keep learning! Join and start boosting your career
Playwright Tracing is an indispensable tool for analyzing performance and detecting problems in your automated tests. When testing, we do not always get the expected results and it is crucial to identify errors in order to optimize the performance of our software. With Playwright Tracing, we can track and understand what happens before and after executing a specific action in a test, capturing details that help us debug efficiently.
By default, Playwright Tracing is disabled. To enable it and start logging traces, run the following command in the terminal:
npx playwright test tiendaonline --trace on
This command runs the test defined in the tiendaonline.spec.ts
file and generates a .zip
file containing the traces for further analysis.
Once the tests have been executed, we can visualize the traces by opening the generated report with:
npx playwright show-report
In the report, you will see a rectangle with three bars indicating that the trace files are ready to be inspected. By clicking on this link, we can download the traces or browse directly in the graphical interface.
Knowing what happens during test execution allows us to:
Efficiently using Playwright Tracing transforms a tedious testing process into a more controlled activity enriched with valuable details for developers. Continue exploring these tools and hone your skills to create more robust and reliable software!
Contributions 6
Questions 0
Hola hola, la clase #12 “Debugging con API logs” redireciona al landing page del curso
Playwright Trace Viewer es una herramienta GUI que nos asiste en la exploración de casos de pruebas grabados por Playwright después de que se haya ejecutado el script.
.
Dichas grabaciones, podemos abrirlos localmente o mediante el navegador trace.playwright.dev
.
.
.
Para abrir la herramienta en local, tenemos que generar el o los casos de pruebas mediante grabación, usando el comando test
con la opción --trace on
.
.
Después, si se desea, mediante terminal usamos el comando show-trace
.
Para abrir los trace guardados con anterioridad se puede utilizar el siguiente commando desde la terminal:
npx playwright show-trace trace.zip
O desde el browser ingresando el siguiente comando: trace.playwright.dev
La clase #12 “Debugging con API logs” redireciona al landing page del curso, no sale activa.
Want to see more contributions, questions and answers from the community?