Micro Focus QTP (UFT) Forums
Best Practices in Passing Data to Tests - Printable Version

+- Micro Focus QTP (UFT) Forums (https://www.learnqtp.com/forums)
+-- Forum: Micro Focus UFT (earlier known as QTP) (https://www.learnqtp.com/forums/Forum-Micro-Focus-UFT-earlier-known-as-QTP)
+--- Forum: UFT / QTP Others (https://www.learnqtp.com/forums/Forum-UFT-QTP-Others)
+--- Thread: Best Practices in Passing Data to Tests (/Thread-Best-Practices-in-Passing-Data-to-Tests)



Best Practices in Passing Data to Tests - sean.graham@dcsg.com - 08-10-2010

I'm new to QTP but am picking up the basics fairly well.

My question relates to best practices.

I am attempting setup up an architecture where QA analysts and Business Analysts can run preparatory tests (to handle mundane and repetitive test required prior to actual tests) quickly and easily.

Firstly, I would like my implementation to require them to know as little about QTP as possible (in most cases the users would require no knowledge of the tool).

Now, I want to allows the users to provide data for the tests (more specifically, the reusable actions). I would like to allow them to only provide the permutations/combinations of changing data points for their specific test and not have to concern themselves with "unimportant" and unchanging data points (keeping in mind that the list of data points could be different for different users or test cycles). So, I need to make sure the tests/actions implement default values when data is not provided.

The tests and actions have been separated so that they can be reused by other tests. So, each test/action is responsible for loading the dynamic data, applyng default values to data not provided and running each iteration of the test.

I have begun my implemtantion using Excel spreadsheets to load Data Tables with each action requiring input Parameters to apply default values. However, I'm not sure if this is the best approach or not. This implementation requries each action to do checks on each and every potential data point and work with Data Tables and Parameters to come up with the right value. This just seems like alot of upfront code that might not be necessary.

Are there other/better methods? Would variables make more sense?


RE: Best Practices in Passing Data to Tests - QTPLearn - 08-11-2010

Automation Framework or Approaches depends on Application and Test Cases. So most of the time we cannot standardize any specific framework. In short any approach is best in automation if it has below properties:
1)Less Maintainance
2)Easy to Debug and Understandable
3)Reusable

Now for your scenario:

Use Datatable to store the inputs and being as a automater code all the scenarios in such a way so that whatever inpits BA or QA provides,it should run and give proper results.
Its true that it will need more coding part but this will help BA /QA to execute the scripts without any issues.They don't need to bother about code,only thing they need to provide correct information.

Do let me know if anything worng or not clear.

Smile~Regards: