Bird
0
0

Given this code snippet, what will be the folder name where the HTML report is saved?

medium📝 Predict Output Q4 of 15
Selenium Python - Test Framework Integration (pytest)
Given this code snippet, what will be the folder name where the HTML report is saved?
import unittest
from htmltestrunner import HTMLTestRunner

suite = unittest.TestLoader().loadTestsFromTestCase(MyTests)
runner = HTMLTestRunner(output='reports')
runner.run(suite)
AMyTests
Boutput
Chtml_report
Dreports
Step-by-Step Solution
Solution:
  1. Step 1: Analyze the HTMLTestRunner initialization

    The 'output' parameter is set to 'reports', which defines the folder for saving reports.
  2. Step 2: Confirm folder name usage

    The runner saves the HTML report inside the folder named 'reports'.
  3. Final Answer:

    reports -> Option D
  4. Quick Check:

    Output folder parameter = reports [OK]
Quick Trick: HTMLTestRunner's output param sets report folder [OK]
Common Mistakes:
  • Confusing output param with folder name
  • Assuming default folder without param
  • Using test case name as folder

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Selenium Python Quizzes