Test Overview
This test simulates verifying that Agile development changes how testing is done by checking if continuous testing happens during short development cycles.
This test simulates verifying that Agile development changes how testing is done by checking if continuous testing happens during short development cycles.
import unittest class TestAgileTestingDynamics(unittest.TestCase): def test_continuous_testing_in_agile(self): # Simulate Agile sprint phases sprint_phases = ['planning', 'development', 'testing', 'review'] testing_done = False for phase in sprint_phases: if phase == 'testing': testing_done = True # Assert testing happens in sprint self.assertTrue(testing_done, 'Testing should occur during sprint') # Assert testing was done at least once self.assertTrue(testing_done, 'Testing must be continuous in Agile') if __name__ == '__main__': unittest.main()
| Step | Action | System State | Assertion | Result |
|---|---|---|---|---|
| 1 | Test starts | Test framework initializes the test case | - | PASS |
| 2 | Simulate sprint phases: planning, development, testing, review | Sprint phases list created | - | PASS |
| 3 | Iterate phases and check if testing phase occurs | Loop through phases, testing_done flag initially False | Check testing_done is True when phase is 'testing' | PASS |
| 4 | Assert testing_done is True after loop | testing_done is True after detecting testing phase | Assert testing_done is True to confirm continuous testing | PASS |
| 5 | Test ends | Test case completes successfully | - | PASS |