Forum Discussion
2 Replies
- shankar_rCommunity Hero
Best way is to have separate Test Item for Login alone then you can refer that in all of your 2000 keyword tests.
1) Create a Keyword test which contains only Login module.
2) Add that created Login keyword as a Item in your all tests.
To do that you can do following,
- tristaanogreEsteemed Contributor
Question: Are you using name mapping? If so, then what the developers change the component identifying factors, your tests don't need to change, all you need to do is update your mapping to use the new values. Your tests will inherit those changes. This is the advantage of using name mapping in that you don't need to go through end edit the naming of your objects all over the place... centralized repository of objects, basically.
If you're not using NameMapping, then things are a bit more challenging, of course. Keyword tests don't do will with "Replace All" across multiple tests. What I would do is go with what is always a good development best practice: no duplicated code. If you see the same general code being repeated multiple times (and your login steps is exactly that), then it's best to pull that code out of the test and make it a separate keyword test or even a script function that you would call in all your tests. That way, when development changes the login process, components, etc., you don't need to change 2000 tests, you just need to change the libraried function. Even if you ARE using namemapping, this is highly recommended as a best practice to follow. It will help in the maintenance of your application testing in the long run.
Related Content
- 4 years agoMadGrb
Recent Discussions
- 4 hours agojstaehlin
- 22 hours agoAivanitskiy