Quality assurance vs quality control in Testing Fundamentals - Automation Approaches Compared
from selenium import webdriver from selenium.webdriver.common.by import By from selenium.webdriver.support.ui import WebDriverWait from selenium.webdriver.support import expected_conditions as EC import unittest class TestQualityDefinitions(unittest.TestCase): def setUp(self): self.driver = webdriver.Chrome() self.driver.get('https://example.com/about') self.wait = WebDriverWait(self.driver, 10) def test_quality_definitions(self): driver = self.driver wait = self.wait # Wait for QA section and verify text qa_section = wait.until(EC.visibility_of_element_located((By.ID, 'quality-assurance'))) expected_qa_text = 'Quality assurance (QA) is the process of ensuring that the product meets the required standards through planned and systematic activities.' actual_qa_text = qa_section.text.strip() self.assertEqual(actual_qa_text, expected_qa_text, 'QA definition text does not match') # Wait for QC section and verify text qc_section = wait.until(EC.visibility_of_element_located((By.ID, 'quality-control'))) expected_qc_text = 'Quality control (QC) is the process of identifying defects in the actual products produced.' actual_qc_text = qc_section.text.strip() self.assertEqual(actual_qc_text, expected_qc_text, 'QC definition text does not match') def tearDown(self): self.driver.quit() if __name__ == '__main__': unittest.main()
This test script uses Selenium with Python's unittest framework to automate verification of the Quality Assurance and Quality Control definitions on the About page.
In setUp, the browser opens the About page URL. We use WebDriverWait with explicit waits to ensure the sections are visible before accessing their text.
We locate the QA and QC sections by their id attributes, which is a best practice for stable and clear locators.
Assertions compare the actual text on the page with the expected definitions exactly, ensuring correctness.
Finally, tearDown closes the browser after the test.
Now add data-driven testing with 3 different pages that have QA and QC definitions
Practice
Quality Assurance (QA) in software testing?Solution
Step 1: Understand QA's role
Quality Assurance is about the process and preventing defects early.Step 2: Compare with other options
Options A, B, and D describe Quality Control or development tasks, not QA.Final Answer:
QA focuses on improving the process to prevent defects before they occur. -> Option AQuick Check:
QA = Process improvement [OK]
- Confusing QA with QC
- Thinking QA only tests software
- Believing QA fixes bugs
Quality Control (QC)?Solution
Step 1: Define QC
Quality Control focuses on inspecting and testing the product to detect defects.Step 2: Eliminate incorrect options
Options A, C, and D describe other roles unrelated to QC.Final Answer:
QC involves testing the product to find defects. -> Option BQuick Check:
QC = Product testing [OK]
- Mixing QC with process design
- Assuming QC writes code
- Confusing QC with project management
Solution
Step 1: Identify QA activity
Creating a checklist to improve process is a QA activity.Step 2: Identify QC activity
Running tests to find bugs is a QC activity.Final Answer:
Creating checklist is QA; running tests is QC. -> Option CQuick Check:
Checklist = QA, Tests = QC [OK]
- Swapping QA and QC roles
- Thinking both are same
- Ignoring process vs product difference
Solution
Step 1: Understand QA's responsibility
QA focuses on preventing defects by improving processes.Step 2: Identify error in statement
Finding bugs is the role of QC, not QA.Final Answer:
QA is responsible for preventing defects, not finding them. -> Option DQuick Check:
QA prevents defects, QC finds them [OK]
- Confusing QA with QC
- Assuming QA finds bugs
- Mixing roles of QA and developers
Solution
Step 1: Analyze process audits
Process audits check and improve processes, so they are QA activities.Step 2: Analyze automated testing
Automated testing finds defects in the product, so it is QC.Final Answer:
Process audits are QA; automated testing is QC. -> Option AQuick Check:
Audits = QA, Automated tests = QC [OK]
- Mixing audits with testing
- Assuming all testing is QA
- Ignoring process vs product focus
Ready to prove it?
Pass the test and this pattern moves unknown
