automation QA responsible for manual, exploratory & qualitative testing Automated functional tests written in terms of the domain model, not the user interface
Tasks Domain Model Behind the scenes Visible in test code System under test Production System Interface Plays Acts upon Acts upon Creates Creates Performs Defined in terms of Defines
val scenario = theProduction.newScenario() val alice = scenario.newAuthor() val ed = scenario.newEditorialStaffMember() val submissionDetails = exampleSubmission.withSingleAuthor(alice) val initialSubmission = alice.hasSubmitted(submissionDetails) val amendment = ed.canRequestAmendmentOf(initialSubmission) alice.canReview(amendment, expectedContents = submissionDetails.withStatus(IN_PROGRESS)) alice.canUpdate(amendment, SetTitle("a new title"), SubmitToPeerReview) ed.canSeeInThePeerReviewSystem(amendment, status = RECEIVED) }
action in multiple ways • Different ways to navigate through the user interface • Different ways to upload files • Keyboard vs mouse input • JavaScript vs no JavaScript Approaches: • Choose randomly on each run ◦ A form of property test • Ensure equivalence with unit tests and exercise only one in the functional tests