Technical documents and testing for software applications


Cucumberish - Ahmed-Ali - Github

  • Who writes the User Stories? tricky question. 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?

  1. ⭐️ 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!

  2. ⭐️ Automate regression testing. Don’t break backward compatible functionality

  3. ⭐️ Brings labor and cost efficiency approaches into the light. Do not repeat yourself

  4. ⭐️ It’s a living document (Version Control). New/old stakeholders can read in plain language what does it do!

  5. ⭐️ Demonstrates what cost saving ideas and better utilize time you have. Be transparent and show your knowledge to the client.

No method is more effective than a good example. - Ingvar Kamprad, IKEA Founder

The Problem

A developer could write the following below. But this is missing some context, and only developers could! be able to understand what is 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 out of it is that developers can make a set of reusable tests and stakeholders, product owners, 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