[SOLVED] Parametrized Preferences Context [message #1648297] |
Tue, 03 March 2015 21:32 |
Hernan Wittemoller Messages: 8 Registered: February 2015 |
Junior Member |
|
|
Hi,
For the same set of test cases I need to apply different Preferences contexts to my AUT depending on the OS on which the test run is taking place.
Is there a way to do this? I couldn't find a way to parametrize a Preferences context neither apply them conditionally on a test case.
Thank you
Regards
[Updated on: Mon, 05 October 2015 06:46] by Moderator Report message to a moderator
|
|
|
Re: Parametrized Preferences Context [message #1649017 is a reply to message #1648297] |
Wed, 04 March 2015 05:48 |
|
Hello,
Thank you for contacting us!
In RCPTT IDE you can create several identical test cases, add different contexts to them. You will have several test cases and the only difference between them is the difference between their contexts. Then unite test cases to test suites and after it you just need to execute appropriate test suite on particular platform.
If you need to add specific context for Linux machines and another for Windows versions, but test case itself should not be different for both the Linux and Windows machines, you can use different projects with the same name and same IDs of contexts, the difference is only in location.
Do the following steps for that purpose:
- Move all platform dependent test contexts to a separate project.
- Copy project on filesystem (don't use RCPTT IDE during this step. If you import both projects to the one IDE, an error will appear because of the same IDs of contexts. )
- Change all contexts to handle another required platform (do not create new contexts, edit them in-place, do not change name of project)
- During build supply different context projects using either "Extra projects" option of RCPTT Maven plug-in or directly replacing project with needed version in your build script.
The main idea of this approach is to get two different sets of context with same IDs so that tests reference them in uniform way on every platform.
Also skipping tags might be helpful for you. See more here.
In ECL you can use command get-by-os which returns value depending on current operating system.
Please let me know if it is suitable for you or you have any questions.
Yours sincerely,
Olga.
|
|
|
|
Powered by
FUDForum. Page generated in 0.08598 seconds