Forum Discussion

jose_pjoseph's avatar
jose_pjoseph
Contributor
7 years ago
Solved

Running a subset of tests in a project

I have a project with 100 tests which I have set up with Jenkins to run on a schedule. I would like to run 2 jobs daily:

  1. A "smoke" job which runs 30 tests out of the 100 tests twice a day.
  2. A second job which runs all the 100 tests once a day.

How can I group the "smoke" tests in a project as mentioned above? I found "How to Run a Group of Tests", but that talks about ordering the tests and nothing about running a specific group of tests.

  • I'm not very familiar with the integration between TestComplete and Jenkins... however, as a command line, you can tell TestComplete/TestExecute to run a test item.  So, if you create a "parent" test item that "contains" the ones that you want to run, you can call that via command line.  See https://support.smartbear.com/testcomplete/docs/working-with/automating/command-line-and-exit-codes/command-line.html#command-line-arguments and reference the "/test:" command line switch.

     

    If you organize your tests appropriately, you can call a batch that way. 

  • cunderw's avatar
    cunderw
    7 years ago

    If test items are being used for your project under organize tests then you can group your test items under a parent.

     

    So test items for Project 01 would look like:

    • SmokeTest
      • Test 1
      • Test 2
      • Test ...
      • Test 25
    • Test 26
    • Test ...
    • Test 70

     

    Then on jenkins for your smoke tests job you can specify Project Test when setting up the Test Complete step and use SmokeTest.

     

    For the full run job you can then do the entire suite option

8 Replies

  • Marsha_R's avatar
    Marsha_R
    Champion Level 3

    Have one TC project for just the 30 smoke tests and a separate one for the others.  Keep both those projects in the same project suite.  Then either project can be run separately or the whole project suite can be run.

    • jose_pjoseph's avatar
      jose_pjoseph
      Contributor

      Hmm. The one project I gave above was just an example. We have multiple projects already in our test suite. So this will involve some rework and process changes moving forward. Also, I don't think it will be a good place to be in future when we have more tests and need to re-organize tests from either group, like moving tests from one group to the other.

      Is this the only way? Is there no way to tag a test in a project to belong to a group and then execute the group?

      • Marsha_R's avatar
        Marsha_R
        Champion Level 3

        Rather than an example, it's usually better if you can give us specifics.  Tell us exactly what you have and exactly what your goal is.  Otherwise we go around in these "that's not quite what I wanted" circles and that doesn't get you an answer.