Best practices for organizing scripts
Ok, so i have a few questions.
Trying to follow some best practices, for example to make the test as 'independent from the application as possible' and trying to make everything modular to avoid repetition of work.
I have a few libraries, but now i am creating scripts.
Should i create one master test file, with different actions? or different test files, with one action each ?
For example i have
Navigate to patient
Should each be a separate action? for example navigate to patient is just one single click...
I am a bit confused about all of this.
Also, then the repository for navigate to patient hast just 2 or 3 objects but are called from different places? what is the best way to store this?
should i make it shared? or record for each since its only 3..
Re: Best practices for organizing scripts
It is difficult to give a definitive answer because we don't know your apps, environments, resouce capabilities, managers ethos etc, but a simple method which you could tailor to suit your needs is:
Make use of external function libraries for common routines.
Action = Test case
QTP Script = Application specific (may need more than one script depending on number & size of test cases.
You might also want to think about a common folder structure, we use something like:
... App1 Script1
........ Test Case1
........ Test Case2
........ Test Case3
... App1 Script2
... Test Data
........ XML Files
... Object Reposittories