#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.

3 thoughts on “#Selenium Tales from the road part 1 – Artifact Naming and Organization

  1. Pingback: A Smattering of Selenium #58 « Official Selenium Blog

  2. Just out of interest, I see you name your test cases with a .tc extension. Do you run your tests using the server, or through the IDE? I had issues running suites / cases that didn’t have an extension of .html through the server. If so, I’m interested to know why you don’t use the server, it’s much faster, supports different browsers and has reporting.

    I still don’t have a standardised method for organising and naming my tests, although organising them in a directory structure helps quite a lot. Updating filenames when I think of a better way is a pain, too.

    • Thanks for the comment!

      You are correct I am just running them out of the IDE right now and that is why I have the .TC extension. My next step will be automating the tests using the Remote Server so I am sure I will rename the file extensions at that time. I was just trying to get all the kinks out and have sufficient volume before I started using the Remote Server.

      Thanks again for the info!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s