#Selenium Tales from the road part 1 – Artifact Naming and Organization

How have people organized and structured the artifacts that Selenium uses? As a moderate user of Selenium, I wonder if I am doing this the recommended way or if there are better ways that I am unaware of. To this end I thought I would share the organization and structure I have used and see if anyone can provide suggestion on how to make it better.

Current State

I am using Selenium 2.1 and I am also creating Test Cases and Test Suites. I am using User Stories to capture my requirements and the Test Suites and then the Test Cases are based off of those requirements. The table below shows the naming standards and organization that I have used:

Artifact

Naming Standard

Conventions

User Story

[User Story #]-[User Story Description]

Documented in TargetProcess

Test Case

[User Story #]-[Test Case Description].tc

Multiple test cases per User Story

Test Suite

‘US'[User Story #’s (separated by ‘-‘)].ts

Multiple User Stories per Test Suite.

Why?

Why did I choose the following seemingly complex naming standards? Well I was having these problems:

  1. I could not tell which Test Cases where in which Test Suite
  2. I could not tell which Test Cases tested which User Story
  3. I could not tell which User Stories were tested by which Test Suite

By using the above naming standard and organization, I was able to answer all of these questions and also organize my Selenium artifacts relatively easily. I wrestled with possibly numbering the Test Cases and then referencing those Test Case # in the Test Suites. But I realized that the Test Case # was not that useful. What I really need to know was what User Story the Test Case and Test Suite exercised.

So far these naming standards and organization has worked quite well.

Suggestions?

What has everyone else found? Are there best practices I am not using? Any recommendations?

Next Steps

Over the next little while, I will publish three additional Blogs related to my Selenium experience. The Blog posts will address the following topics:

  • Selenium integration and reporting with TargetProcess
  • Selenium integration and automation with Maven (or possibly Fitnesse)
  • Selenium Test Case tips and tricks (I’ve already found a wealth of tips and tricks but I thought I would wait until I have automated all my tests)

Hopefully this will be of interest to others out there. Please let me know if there are certain topics people would like to see discussed.