What is the main purpose of acceptance testing in software development?
Think about who acceptance testing is done for and what it confirms.
Acceptance testing ensures the software meets the agreed business needs and is acceptable to the user before release.
Given this acceptance test result summary, what is the overall test outcome?
Test Case 1: Passed Test Case 2: Passed Test Case 3: Failed Test Case 4: Passed
Acceptance testing requires all critical tests to pass for acceptance.
If any acceptance test fails, the software does not meet the acceptance criteria and is rejected.
Which assertion best verifies that a user login feature meets acceptance criteria?
def test_user_login(): result = login('user1', 'password123') # Which assertion below is correct?
Acceptance criteria usually specify exact expected outcomes.
Checking the exact success message ensures the feature behaves as the user expects.
Find the bug in this acceptance test code for a shopping cart feature:
def test_add_item():
cart = ShoppingCart()
cart.add_item('apple')
assert 'apple' in cart.items # Check item added
assert len(cart.items) == 0 # Check cart sizeThink about what happens after adding one item to the cart.
After adding 'apple', the cart should have one item, so length should be 1, not 0.
Which approach is best for automating acceptance tests to ensure maintainability and clarity?
Think about readability and collaboration between testers and business stakeholders.
BDD frameworks use plain language to describe acceptance criteria, making tests clear and maintainable.