As the name suggests, this is driven by Module. Now what is a module—well it is small independent scripts that performs a specific set of tasks.It creates an layer in front of the component and hide the components from a non technical user as well as application.
The small components are added up to build a large test set.
Say I need to log in to an application. So I will select the module –login.
This login module will internally call generic functions.
How …lets see,,
Login component will contain ..
1. open the url ….so login module will take input1- url
2. It will open a browser and navigate the url
3. Now it will write user name ….so the second input is user id
4. similarly password and 3rd input will be password
5. click on a button whose name is Submit.(This is bit tricky..instead of clicking on submit button directly..we can make a common function which will accept a title name and click)…so this will be my 4th input.
Here the flow is controlled by the login module but originally done by individual functions. So it is a functional decomposition method aiming to do unit set of tasks. Each task has only one calling point and will have only one exit point with finite and definite outcome.
Modular way of dividing requirements will reduce the test building cost in the long run with higher re usability.
Modular Framework will have 3 to 4 layers.
2.Higher level components
3.Lower level components
Summation of these will create a business flow.
Let us discuss the modular framework architecture…
The core is the Master driver---This only consists of the calling business cases like—
- Create user
- Define attribute
- Open Application
- Set user id
- set Password
- Click on Ok/submit
The Module(business specific) might call an function which is not generic for other module but can have some functions which are generic in nature
Write Customer Name in the text box is a generic function..where this is a type of setting a textbox with a specific value…this is generic across the application.
But if the test case is …
give 5% discount if the customer location is from Kolkata but 10% if he is from HyderabadThis type of function is still generic but specific to that module only.
This way the Modular specific function is build.all this is called in the business level and sequentially called in Script level.
so the structure is…
Driver Script-consists of high level business level statements. It is used to describe the sequence of tests to be executed.
Business Module-Consists of generic functions from generic function library or business specific functions from Business function library.
Common Functions:-Consists of all level of common functions.
Business Specific Functions: A library where all business specific functions resides.
Recovery Functions: A Function library where all types of recovery functions resides.
Data Table: Set of data for the testing.
- Testdata and business logic are separated.
- Hierarchical structure.
- Each tech script will have its own test data file so easy to maintain.
- Generic or specific business library for business flows
- Better recovery as each script will report pass/fail to master driver.
- Script can also be made when application is still under development.
- Need proficient test code developer
- Complex data management