views:

268

answers:

3

I need to create a nested test suite in Selenium that will run in the Selenium IDE or the Selenium TestRunner. This is basically the structure that I'm trying to achieve:

MasterTestSuite.html
 - ComponentTestSuite.html
    - TestCase1.html
    - TestCase2.html
 - OtherComponentTestSuite.html
    - TestCase3.html
    - TestCase4.html

I NEED to be able to achieve something equivalent to this. I have started to try an Include extension, which allows me to include the contents of another test case, but I am running into problems with it. How have you achieved this? What advice can you give on how to help me achieve this?

A: 

As far as I know, Selenium IDE does not support this. The way most people do this is to create the individual test suites and run them individually.

I do this in C#/NUnit by creating a *.cs file for each main area and then setting categories for each of the tests to get the extra granularity

e.g.

namespace Test.The.World
{
   [TestFixture]
   public class UK 
   {
      [Test]
      [Category("Southern Counties")]
      public void Sussex_Brighton(){
          .....
      }
      [Test]
      [Category("Southern Counties")]
      public void Hampshire_Southampton(){
          .....
      }
   }
}

And then use the NUnit functionality to run tests accordingly.

I am sure most frameworks for most languages have this kind of feature

AutomatedTester
A: 

Hi,

I'm using model based testing together with Selenium on a daily basis and with a model you can put the logic how the tests should be executed and as well the tests its self.

There are some Open Source/Free Software "robots" like http://www.xqual.com/ XStudio. I have tried it a bit and does the work but quite messy to work with but good if your test environment does not change to often. You can here put start automatic executions at a daily basis etc and does report back the results.

Cheers, Stefan

StefanE
A: 

You need SeleniumRC and some progammint language tool to write and run tests. SelenimIDE allow to save test in several languages (C#, JAVA, PHP, Pyton and etc.) Use one you familiar with. Also with out SetUp and TearDown difficult to do good tests. Selenium IDE does not allow this methods.

Igor Rodinov