Who writes the User Stories? tricky question. The best case, is the output of a conversation between devs, product owners/managers, stakeholders, and quality assurance testers
How to write them? There is a format for that! Gherkin!
What is it? Specification document + automation test scripts
Why do it?
⭐️ It gets you the definition of DONE. In the case your client/organization is not product-driven, it gets them to help you define what they want from the product!
⭐️ Automate regression testing. Don’t break backward-compatible functionality
⭐️ Brings labor and cost efficiency approaches into the light. Do not repeat yourself
⭐️ It’s a living document (Version Control). New/old stakeholders can read in plain language what does it do!
⭐️ Demonstrates cost-saving ideas and better utilize the time you have. Be transparent and show your knowledge to the client.
How to implement it?
No method is more effective than a good example. - Ingvar Kamprad, IKEA Founder
The Problem
A developer could write the below. But this is missing some context, and only developers could! be able to understand what the system is doing.
func testSystem_whenReset_isInStarted() {
sut.setToInProgress()
sut.restart()
XCTAssertEqual(sut.state, .blank)
}
A different approach: Give me an example
Given the application is "in progress"
When a user "restarts" the application
Then the application will set to "default"
func Given("the application is [regex]") {
state insut.set(state)
}
func When("a user [regex] the application") { action
insut.perform(action)
}
func Then("the application will set to [regex]") { expected in
XCTAssertEqual(expected, sut.state)
}
The result is that developers can make a set of reusable tests, and stakeholders, product owners, and QA testers can expand the tests into every state of the system.
Developers only need to keep following their TDD approach.
Are you interested in implementing the above? I offer this service.
Comentários