How to create Frame work and How to call all functions in one main?
We started using Test complete but not very clear on how to create a framework. Went through the Training materials available, but couldn’t understand. Could you please help us on below questions:
- 1. How to design a framework?
- 2. As of now our QA team created separate scripts for all function/features and all the scripts contains “main “, wondering is it possible to call all that functions in One “Main” if so how can we link back to all the functions?
Appreciate your help
Thanks
Mamata
1.1 How to design a framework.
This is a tough one and can't be fully explained in forum message, need a real worksop because depends a lot of you, your goal, your team, your business, ..
But in a quick guidance view, below my way of doing :
- Have technical object to manage things not related to business/TC (e.g. Services, Cmd, System, DB, ..).
- Have one object dedicated to one app;
- Build this object as OOP as you can
- Build it with at least 3 layers; base function not linked to business, base business function and complex business function.
- Think about useful properties (e.g. Performance or Functiunal exec mode, log level, base path, ..)
- Use documentation framework (i use jsdoc style comments and a tweaked jsdoc module of nodejs)
- Include self test in your object
2.2 Usage
Several techniques, pseudo-class, closure, useunit, modules ... depends again of multiples things.
Personnally i use a closure object method and 2 units (one for global keys mappings/variables, one for business object/methods). And the call from tests cases is made by //USEUNIT