Automation & Test Cases

I’ve come to realize that my answers to life and the universe may vary from others. Sometimes I fall in love with my answers, but I’m nearly always quite open to ideas that differ from mine. In fact, I love the conflict in thought because it makes me re-think the original problem.

One such example is in my mind. Slightly mentioned in HWTSAM and described in detail in my chapter of  Beautiful Testing is my approach to automation. When I write automation, I don’t think of test cases first. I may use a spec, notes from a spec, or just lot’s of notes in general to help me design test automation. I explore the component I’m testing– either manually, or in the debugger and create the tests as I develop the automation (skipping lot’s of design stuff because that’s not the point of this post). When I’m done, I prefer an approach where I extract the test cases from the test automation (either via c# attributes or export names or some other form of tagging meta data) and import theses test cases into the test case management system.

An alternate approach is to write the test cases first, import them into the TCM, then write the automation (optionally creating stubs automatically from the test cases). At first, I thought I didn’t like the idea at all, but I suppose it does force you to think about the details of testing up front (if that’s a good thing). One con that I haven’t resolved is what to do when the automation changes. With my approach, you just re-import the metadata. If you change the automation using the alternate approach, you probably need to update the TCM manually – but I suppose you could find a way to make that easy.

How about you – do you prefer one approach over the other or have an alternate approach? 

Similar Posts

  • Five for Friday, July 15

    Today was a day off for Unity, so I rode Side Hustle again (link in last week’s FfF). Overall, not a horrible week for me, even though the world continues to find ways to suck. Here are a few interesting links I found this week. My first job in Tech wasn’t until (until?!?) 1993. But…

  • My Latest Experiment

    I thought it would be worth writing this up and sharing. Last week was, for me, at least, time for another Windows update. With this one, my mouse stopped working – or to be clear, it started becoming unusable. The x coordinate speed was 1/3 of what it should be. With three monitors, it was pretty…

  • My new world

    Twenty-twelve has been a heck of a year so far. The day job has been keeping me swamped, but the work, the challenges, and the scope feel perfect – I’m having a great time, and I couldn’t ask for anything more in a job. Historically, most of my blog posts come from experiences or inspiration…

  • Five for Friday – October 12, 2018

    Another Friday, another week with cool things to share. I’m happily working through Steven Johnson’s newest book, Farsighted: How We Make the Decisions That Matter the Most. I’m a massive Steven Johnson fan, and this book is stories and insights about decision making – but not quick decisions like in Blink (Gladwell) or Decisive (Heath…

3 Comments

  1. Hi Alan,

    My approach is somewhat model-based.

    1. Take business logic flow
    2. Explore it extensively, around, above, and beyond.
    3. Build a test logic tree (good to document with mindmapping tools or IDEF0 blocks)
    {Finding new defects and issues at stages 2 and 3 is typical}
    4. Decompose the test flow
    5. Implement test components of the flow, assembly the flow
    6. Create or import business logic test data. Create test control data (my framework is hybrid keyword/data driven)
    7. Attach exit points for negative test cases, supply additional business and test control data for those TCs.
    8. If company uses traceability matrices, build coverage documents

    None of the steps above require coding.
    I use abstract functional modeling language to write instructions; XML format is a container for both execution instructions and execution logs produced.

    I used to work in environments with a highly centralized TCM system, and environments where all TCs where distributed across the teams Excel/Word documents, and in both ways I’m not comfortable with a high duplication rate of test steps in traditional Test Case documentation approach. Personally I see TCs as a dynamic multi-branched flow, and this is how I automate them.

    Thank you,
    Albert Gareev

  2. I love the no TCM approach. This is where you comment your automation really well, demo it, get it reviewed, create a collaborative descriptive wiki that is easy to update if it changes, and then you do your testing.

    I have yet to see a TCM really add true value. I do realize there are policies and how things are done, but I think overall there may be less TCM and not more. In some places they are considered retro.

  3. I think it should really be a combination approach. We have had TCM first approach while we were sorting out the resources and tools to use for the web automation, and when we did start the automaiton design we stumbled road blocks in terms of mapping the test cases to the automation design and vice-versa. So we had to really combine test cases or split test cases to accomodate the design. And this became a further level of complication since we also used a tool to read the test cases off of TCM and log the results back to it.

    What we realized was a combined approach of having the scenarios nailed down and start the automation design would have helped to add test cases as we go along with automation design in parallel.

    But having the scenarios would be really helpful before designing both applicaiton code and the automation in my observation.

    -Ram

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.