need more effort to close the open defects)
Finally Email me to get the tool! , Ahmed.Ibrahim@yahoo.com
Objective
The main objective of this article is to set some guidelines to guide the automation process in any project.
This document will present the automation process sequentially from the beginning (ROI for the project, schedule and estimation, execution, and maintenance)
for any further help or to get the template please contact me Ahmed.Ibrahim@Yahoo.com
Should we automate the testing?
First of all we must answer this question , we will doing that by conducting ROI on the project then let the upper management to decide should we automate it or not?
There are some questions must be answered before doing the ROI:
The upper management must agree on ROI analysis result in order to resume the automation project, and must be updated regularly with the measurement and results from the automation.
# | Type | Factor | Impact | Remarks |
1 | Framework | Availability | High | Good framework makes your scripting, debugging and maintenance easier. Do understand that framework needs continuous updating across the script development. |
2 | Application | Repeat functionality | High | It is quite easier to automate incase the functionality repeats across the application (Recommend to use keyword driven in such cases, as you do not end up in writing more action/verification based methods). If NOT, then the effort of building libraries and/or scripts is more linear in nature. |
3 | Project | Test Scope | High | If the complexity of application as well as the test scope is complex in nature, then it would consume huge efforts to automate each test case. |
4 | Test tool | Support to AUT | Medium | The test tool to be used may not support some application functionality and may cause overhead. You may find it more difficult to get started with open source scripting and/or tools |
5 | Application | Custom Objects | Medium | The number of custom objects in the automation scope matters as it becomes overhead for the test automation team to built and maintain the libraries for them. |
6 | Scripter | Skills | Medium | This costs project. The right skill packages of the scripter are very essential for any good test automation. If the customer NOT willing to provide the leverage on the estimate for this factor, do NOT forget to add the learning curve cost to the overall time. |
SUB COMPONENT | Estimated Efforts | Remarks | |||
Simple | Medium | Complex | |||
Pre–Script Development | |||||
Test Case execution (Manual) | 0.5 | 1 | 2 | For 1 iteration (assuming scripter knows navigation) | |
Test data selection | 1 | 2 | 3 | For one data set (valid/invalid/erratic kind) | |
Script Template creation | Can use script template generation utility to avoid this | ||||
Identify the required reusable (Design the TC before start) | Assuming proper reusable traceability matrix presence | ||||
Script Development | |||||
Application map creation | Assuming the no of objects = number of actions | ||||
Base scripting | Normally all these go hand-in-hand. Separated for analysis & reasoning. | ||||
Add error/exception handling | |||||
Implement framework elements | |||||
Script Execution | |||||
Script execution | For n iterations (~ average iteration count) | ||||
Verification & Reporting | Assuming there will minimal defect reporting. | ||||
Total Effort per script | 15 | 30 | 50 |
Role | Responsibilities |
Automation Project Sponsor | Approve project ROI, handle major issues related to automation project development, and approve on required resources |
Automation Project Manager |
|
Test Automation Tem Leader |
|
Test Automation Designer | |
Test Automation Developer |
|
Test Automation Officer |
|
Automation Process
Analyst:
2-Entrance Criteria
For Existing test cases:
The entrance criterion for the design phase is a valid and reviewed test case and categorized by group according to the business
For Updated Test cases:
The entrance criterion for the design phase is any updates done on the base lined test cases.
- The test cases which are reviewed by the analyst and Base lined
- TCTM
Inform the configuration controller to check out desired test cases by mail
.\DesignTemplate.doc
.\Automation_TM.doc
After studying the test cases and conducting the knowledge transfer meeting with the analyst, the designer must be able to clarify any ambiguity in the test case to the developer to help him to achieve a quality code
Prepared by the designer to discuss it with the analyst in the KTM –embedded in the design document -
For every set of test cases (Test Case Group)
For the above mentioned reviews
By the end of reviewing the design document x
For each test case, the design end is reached when the designed test case has been already tested, reviewed and base lined.
Developer:
Designer:
Based line the design document will trigger this process to start.
Traceability Matrix: to be updated by developed script.
Design Document: to be followed by the developer.
Maintenance Matrixes:
The purpose of this function to illustrate which subroutine used in which business function
The purpose of this function to define which test case will be affected by changing certain item
According to the design document the developer must develop the required scripts and required data pools according to the coding standard
Please see the coding standard at the path:
Put the link here.
Check in the scripts in the source safe tool.
Extract All Cases from Requirement using Cause and Effect Analysis Technique
Introduction:
This article describe in details an organized method to extract all possible cases from the requirement , this can help the system analyst in defining all the cases and also can help developers while preparing the unit TCs and of course will help the testers to write unified test cases.
First of all suppose you have the following requirement:
A mailing is to be sent out to customers.
The content of the mailing is about the current level of discounting and potential levels of discounting. The content is different for different types of customers.
Customer Types A, B and C get a normal letter except Customer Type C, who get a special letter. Any customer with 2 or more current lines or with a credit rating of ‘X’ gets a special paragraph added with an offer to subscribe to another level of discounting.
The problem is if you give this requirement to any 4 different testers, the 4 will produce different no of TCs, I will explain how to derive a unify number of TCs using cause and effect analysis and decision table.
First the analyst must break down the requirement to causes and effects
– Cause: is a distinct input condition or an equivalence class of input conditions (the cause which trigger the effect) in our above example Customer Type (A,B,C, Other) is a cause
– Effect: is an output condition. Determine the logical relationship between the cause and the effects , in our above example “Get a normal letter” is an effect for the cause customer type(A,B,C, Other )
Usually the effects is an output action (Ex. Error message , application action , executing specific application job , etc…)
After this step you should have cause and effects like that:
C1: Customer Type A,B,C, Other
C2: 2 or more lines
C3: Credit Rating
E1: Normal Letter
E2: Special Letter
E4: Add special paragraph
E5: Get Normal letter
Then we should fill the decision table by putting the cause and the effects together in that table as a following:
Cause\Effect | | | | |
C1: | | | | |
C2: | | | | |
C3: | | | | |
| | | | |
E1: | | | | |
E2: | | | | |
E3: | | | | |
E4: | | | | |
E5: | | | | |
This is very important step to know no of columns in our decision table, simply use this formula to know all no of combinations that can be occur:
• If all causes are simply Y/N values:
2number of causes
• If 1 cause with 3 values and 3 with 2:
31 * 23 = 24
In our example, C1 has 4 values (A or B or C or Other) AND C2 has 2 values (YES or NO) also C3 has 2 values (YES or NO) so our formula should be :
14 * 22 = 16 combinations
So we should draw for the decision table 16 columns which present 16 different combinations.
Now the table should be like that:
Cause\Effect | | | | | | | | | | | | | | | | |
C1: | | | | | | | | | | | | | | | | |
C2: | | | | | | | | | | | | | | | | |
C3: | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | |
E1: | | | | | | | | | | | | | | | | |
E2: | | | | | | | | | | | | | | | | |
E3: | | | | | | | | | | | | | | | | |
E4: | | | | | | | | | | | | | | | | |
E5: | | | | | | | | | | | | | | | | |
We can fill columns 2 methods:
1- Logical method: in this method you start filling column by column , start with the causes and end up with the effect (put into consideration that every column is a case).
2- Repeating Factor Algorithm method:
a. Determine Repeating Factor (RF): divide remaining combinations by the number of possible values for that cause
b. Write RF times the first value, then RF times the next etc. until row is full
Example for using Repeating Factor Algorithm: suppose you have the following decision table:
| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 |
C1(Y\N) | | | | | | | | |
C2(Y\N) | | | | | | | | |
C3(Y\N) | | | | | | | | |
| | | | | | | | |
E1 | | | | | | | | |
E2 | | | | | | | | |
Fill first row: RF = number of remaining combination (8) / possible value for this
Cause (2) = (8/2 = 4) , so we will fill 4 from Y and 4 of N , the DT will be :
| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 |
C1(Y\N) | Y | Y | Y | Y | N | N | N | N |
C2(Y\N) | | | | | | | | |
C3(Y\N) | | | | | | | | |
| | | | | | | | |
E1 | | | | | | | | |
E2 | | | | | | | | |
Fill Second row: RF = number of remaining combination (4) / possible value for this
Cause (2) = (4/2 = 2) , so we will fill 2 from Y and 2 of N , the DT will be :
| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 |
C1(Y\N) | Y | Y | Y | Y | N | N | N | N |
C2(Y\N) | Y | Y | N | N | Y | Y | N | N |
C3(Y\N) | | | | | | | | |
| | | | | | | | |
E1 | | | | | | | | |
E2 | | | | | | | | |
Fill Third row: RF = number of remaining combination (2) / possible value for this
Cause (2) = (2/2 = 1) , so we will fill 1 from Y and 1 of N , the DT will be :
| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 |
C1(Y\N) | Y | Y | Y | Y | N | N | N | N |
C2(Y\N) | Y | Y | N | N | Y | Y | N | N |
C3(Y\N) | Y | N | Y | N | Y | N | Y | N |
| | | | | | | | |
E1 | | | | | | | | |
E2 | | | | | | | | |
Filing DT in example1:
In example 1 we have 3 causes and 5 effects with total number of combinations = 16 combinations
Fill first row: RF = number of remaining combination (16) / possible value for this
Cause (4) = (16/4 = 4) , so we will fill 4 from every type (A,B,C,O) , the DT will be :
Cause\Effects | | | | | | | | | | | | | | | | |
C1(A,B,C,O) | A | A | A | A | B | B | B | B | C | C | C | C | O | O | O | O |
C2(Yes\No) | | | | | | | | | | | | | | | | |
C3(yes\No) | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | |
E1 | | | | | | | | | | | | | | | | |
E2 | | | | | | | | | | | | | | | | |
E3 | | | | | | | | | | | | | | | | |
E4 | | | | | | | | | | | | | | | | |
E5 | | | | | | | | | | | | | | | | |
Fill Second row: RF = number of remaining combination (2*2) / possible value for this
Cause (2) = (4/2 = 2) , so we will fill 2 from every Y and 2 from N , the DT will be :
Cause\Effects | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 |
C1(A,B,C,O) | A | A | A | A | B | B | B | B | C | C | C | C | O | O | O | O |
C2(Yes\No) | Y | Y | N | N | Y | Y | N | N | Y | Y | N | N | Y | Y | N | N |
C3(yes\No) | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | |
E1 | | | | | | | | | | | | | | | | |
E2 | | | | | | | | | | | | | | | | |
E3 | | | | | | | | | | | | | | | | |
E4 | | | | | | | | | | | | | | | | |
E5 | | | | | | | | | | | | | | | | |
Fill Third row: RF = number of remaining combination (2) / possible value for this
Cause (2) = (2/2 = 1) , so we will fill 1 from every Y and 1 from N , the DT will be :
Cause\Effects | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 |
C1(A,B,C,O) | A | A | A | A | B | B | B | B | C | C | C | C | O | O | O | O |
C2(Yes\No) | Y | Y | N | N | Y | Y | N | N | Y | Y | N | N | Y | Y | N | N |
C3(yes\No) | Y | N | Y | N | Y | N | Y | N | Y | N | Y | N | Y | N | Y | N |
| | | | | | | | | | | | | | | | |
E1 | | | | | | | | | | | | | | | | |
E2 | | | | | | | | | | | | | | | | |
E3 | | | | | | | | | | | | | | | | |
E4 | | | | | | | | | | | | | | | | |
E5 | | | | | | | | | | | | | | | | |
1- In our simple example find a don’t care “-” sign and place it ,
| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 |
C1(Y\N) | Y | Y | Y | Y | N | N | N | N |
C2(Y\N) | Y | Y | N | N | Y | Y | N | N |
C3(Y\N) | Y | N | Y | N | Y | N | Y | N |
| | | | | | | | |
E1 | | | | | | | | |
E2 | | | | | | | | |
In the above DT suppose in column 3 and column 4 , when the C2 become “N” the program end , so we will put in C3 the sign “-” which mean done care , the DT will become as follow :
| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 |
C1(Y\N) | Y | Y | Y | Y | N | N | N | N |
C2(Y\N) | Y | Y | N | N | Y | Y | N | N |
C3(Y\N) | Y | N | - | - | Y | N | - | - |
| | | | | | | | |
E1 | | | | | | | | |
E2 | | | | | | | | |
2- After placing the “-” don’t care sign , now remove the repeated columns , column 3 and 4 now become identical so will remove one of them , also column 7 and 8 now identical so I will remove one of them too , so the DT will be :
| 1 | 2 | 3 | 5 | 6 | 8 |
C1(Y\N) | Y | Y | Y | N | N | N |
C2(Y\N) | Y | Y | N | Y | Y | N |
C3(Y\N) | Y | N | - | Y | N | - |
| | | | | | |
E1 | | | | | | |
E2 | | | | | | |
After removing the columns you must do a checksum for the table to assure that the DT still
cover all the original combination = 8
To do checksum:
• For each column calculate the combinations it represents
• A ‘-’ represents as many combinations as the cause has
• Multiply for each ‘-’ down the column
• Add up total and compare with step 2
So the check sum will be as follow:
| 1 | 2 | 3 | 5 | 6 | 8 |
|
C1(Y\N) | Y | Y | Y | N | N | N |
|
C2(Y\N) | Y | Y | N | Y | Y | N |
|
C3(Y\N) | Y | N | - | Y | N | - |
|
| | | | | | |
|
E1 | | | | | | |
|
E2 | | | | | | |
|
Checksum | 1 | 1 | 2 | 1 | 1 | 2 | 8 |
• Read column by column and determine the effects
• One effect can occur in multiple test combinations
Cause\Effects | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 |
|
C1(A,B,C,O) | A | A | A | A | B | B | B | B | C | C | C | C | O | O | O | O |
|
C2(Yes\No) | Y | Y | N | N | Y | Y | N | N | Y | Y | N | N | Y | Y | N | N |
|
C3(yes\No) | Y | N | Y | N | Y | N | Y | N | Y | N | Y | N | Y | N | Y | N |
|
| | | | | | | | | | | | | | | | |
|
E1: Normal letter | X | X | X | X | X | X | X | X | | | | | ? | ? | ? | ? |
|
E2: Special Letter | | | | | | | | | X | X | X | X | ? | ? | ? | ? |
|
E3: Add paragraph | ? | X | X | | ? | X | X | | ? | X | X | | ? | ? | ? | ? |
|
E4: No Letter | | | | | | | | | | | | | | | | |
|
Checksum | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 16 |
As we see in the above table after adding effects to the table you can:
1- Determine if you have missing requirement or not as the case we place “?” , the requirement is missing if the customer type is other than the 3 types A,B,C
2- You can determine if there is a redundant requirement , example in the column 6 and 7 by looking into the table you will find the 2 columns has the same effects , so you can ask the client or the analyst about this situation and if it doesn’t matter to have credit line or not in case of customer type B
3- Finally you will be sure that you cover all possible scenarios by doing this analysis.