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 Involves 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) }
model, or more slowly against different deployments of the system Tests are quick to write • Concise • Type safe • IDE support: navigation, auto-complete, refactoring, etc. Tests are easy to read • Concise • No user-interface and technical details No duplication in test code or between test & production code
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