Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Aprenda Challenge: Analyze Test Failures with Pandas | Analyzing and Visualizing Test Data
Practice
Projects
Quizzes & Challenges
Quizzes
Challenges
/
Python for QA Engineers

bookChallenge: Analyze Test Failures with Pandas

In quality assurance, being able to quickly pinpoint failed tests and spot performance issues is critical. When you have a large suite of automated tests, efficiently extracting the IDs of failed tests and determining the average duration of passing tests helps you focus your debugging efforts and optimize your test runs. In this challenge, you will use pandas to analyze a DataFrame of test case results, practicing your ability to filter, aggregate, and extract key metrics that matter most in real-world QA scenarios.

Tarefa

Swipe to start coding

Given a pandas DataFrame with test case results, return the IDs of all failed tests and the average duration of all passing tests.

  • Filter the DataFrame to find all rows with a status of "failed" and extract their "id" values as a list.
  • Filter the DataFrame to find all rows with a status of "passed" and calculate the mean of their "duration" values.
  • If there are no passing tests, return None for the average duration.
  • Return a tuple containing the list of failed test IDs and the average duration of passing tests.

Solução

Tudo estava claro?

Como podemos melhorá-lo?

Obrigado pelo seu feedback!

Seção 2. Capítulo 3
single

single

Pergunte à IA

expand

Pergunte à IA

ChatGPT

Pergunte o que quiser ou experimente uma das perguntas sugeridas para iniciar nosso bate-papo

close

bookChallenge: Analyze Test Failures with Pandas

Deslize para mostrar o menu

In quality assurance, being able to quickly pinpoint failed tests and spot performance issues is critical. When you have a large suite of automated tests, efficiently extracting the IDs of failed tests and determining the average duration of passing tests helps you focus your debugging efforts and optimize your test runs. In this challenge, you will use pandas to analyze a DataFrame of test case results, practicing your ability to filter, aggregate, and extract key metrics that matter most in real-world QA scenarios.

Tarefa

Swipe to start coding

Given a pandas DataFrame with test case results, return the IDs of all failed tests and the average duration of all passing tests.

  • Filter the DataFrame to find all rows with a status of "failed" and extract their "id" values as a list.
  • Filter the DataFrame to find all rows with a status of "passed" and calculate the mean of their "duration" values.
  • If there are no passing tests, return None for the average duration.
  • Return a tuple containing the list of failed test IDs and the average duration of passing tests.

Solução

Switch to desktopMude para o desktop para praticar no mundo realContinue de onde você está usando uma das opções abaixo
Tudo estava claro?

Como podemos melhorá-lo?

Obrigado pelo seu feedback!

Seção 2. Capítulo 3
single

single

some-alt