Forum Discussion

NisHera's avatar
NisHera
Valued Contributor
9 years ago

Test scenario variations

We have several TC test projects developed on functionality basis.
And have requrement such as Run project A then Project B and after that Project A again passing deferent parameters(eg databases).
This could be acomplished with using command line.
But things gets complicated when same project variable should be changed for deferent test items in Project A (eg versions/exe  plus databases).
Using XL files or having project varible for each combinations seems adding more complexity to test frame.
anybody out there overcome this kind of problem?

6 Replies

  • Marsha_R's avatar
    Marsha_R
    Champion Level 3

    You could set it up with an Excel sheet, with each line containing the project to run and the parameters to pass. Your main test would just be a DDT loop interpreting the project name on each line and starting it up with the right parameters.

     

    This would also work inside a project.  Use a different Excel sheet (it can be in the same workbook) and lay out the combinations of versions/databases and pass them in as parameters.

    • NisHera's avatar
      NisHera
      Valued Contributor

      Seems only way out is as you said using Excles and it would add more complexity.

      It would be much simpler if test Items could be run from command line Or

      Projects could be call more than once in project suite.

       

  • What scripting language are you using? If it is JScript you could just define a base main function to take an object which contains your configuration info and then hard code your different project runs with one line function calls 

    :

     

    function tstRun(){

       baseMain({

                          db: "testDb",

                          url: "http://tst....",

                          .........

                        })

    }

     

    function uatRun(){

       baseMain({

                          db: "uatDb",

                          url: "http://uat....",

                          .........

                        })

    }

     

    John

    • Marsha_R's avatar
      Marsha_R
      Champion Level 3

      I guess we don't find it complicated because it's one time setup and then all we need to do is edit the Excel sheet.  

       

      You could certainly set up a master script that calls every thing, but editing that to change the options is more complicated than adding/editing a line in the spreadsheet.

      • NisHera's avatar
        NisHera
        Valued Contributor

        thanks for input....
        I prefer minimum hard coding withing script and it would limit mixing up runing projects
        eg one day run project-A, project-B, project-A another day A, B ,C A ..ect

         

        would still stick to command line passing some varing arguments
        inside project, other variable will be selected using XL

        (eg project A has two test items should run on database X and Y)