Forum Discussion

nstohl's avatar
nstohl
Occasional Contributor
9 years ago

How can I call a testcase via another testcase?

e.g.: I`ve created a testcase which is responsible for the login.

 

Now I want to automate several other testcases which also need a login, but I don`t want to automate the Login for several times.....

4 Replies

  • NisHera's avatar
    NisHera
    Valued Contributor

    if it's keyword test you can do like this

    if script's can use "USE UNIT" like this 

    • baxatob's avatar
      baxatob
      Community Hero

      The best way from my point is to impelement a function with all login steps. Then you can either call it from another script or call it from keyword test using Run Script Routine module.

  • cunderw's avatar
    cunderw
    Community Hero

    Are the test cases Keyword Tests? Scripts? If scripts what language? 

     

    Are the other test cases in the same project or different? 

  • You should refactor your login test case into a login function and a test case that simple calls this function. Then you can call same function from other testcases as well.