Forum Discussion
rafiqque
14 years agoOccasional Contributor
Hi,
Thanks for the reply.
1. Name mapping is a good feature but only problem is, if I create a name mapping with only NativeClrObject. (That is what I get when I run record and play). Name as search criteria at times my object search fails. So even if the object is loaded, still I get a response of object not found error. When I debugged from the node object and drilled down to child/child ... hierarchy the object is there still I use to get this error. But if give multiple search criteria like "clrClassName, Name and Index, then I am not facing such errors. So to map each object with these criteria has become more time consuming for me.
2. As as framework goes, I am trying to develop a framework like this.
Each screen becomes a ODT class.
Entry Fields and verification fields become its properties
so these properties will have the Alias name mapping as their values
eg.
Field: EmployeeNo
Class Property: objEmployeeNo
Value - "Aliases.MyApp.Startup.frmEmployeeDetails.txtEmployeeNo"
Class Property: valEmployeeNo this will hold the value of the employee no field during run-time
Basic methods:
LoadObject() - which assigns the alias values to the properties.
KeyInValue() - Will key in values passed as parameters to the respective entry field
GetValue() - will assign values to the "val" prefixed properties like valEmployee the available value from the screen.
So using these above methods the person who writes a test scenario can key in values and get values and compare it against expected values. And if there is a need one add further functions to this class based on the requirement (as you walk through your test case).
3. While interpreting the manual test case, the test case entry data and verify data is passed through excel sheets.
I have written a test case using these classes. It is running fine.
So to pass data to the test case from excel, I created a dictionary object collection of the excel sheet and using it in my test case to get values. I am not sure it is a good idea. The reason I chose is I was going down several level of functions and wasn't sure how to pass the exel DDTs to them. So instead I create an instance of the collection and pass it where ever necessary.
4. Still I have to cover a lot more
a. Capturing run-time errors both from TC and running application and acting on it.
b. Function error wont be a problem as with the test case step I have success criteria. So I just have to pass or fail it.
5. After the trouble with name mapping I decided to use the direct full name of the object to access it instead of Alias object. I am halfway into writing a program to generate these classes.
This I am doing it using a user form. which will show me all the entry fields of the selected screen. In addition I can point to more controls and add them to my list. Then finally generate the class code using the list of objects selected.
I have already written a program to generate class for grids in my applications coz it is pretty simple as it has only navigate tool strip control, Save/Cancel tool strip and the grid.
Any points or suggestions or even criticism is much appreciated.
Thanks for the reply.
1. Name mapping is a good feature but only problem is, if I create a name mapping with only NativeClrObject. (That is what I get when I run record and play). Name as search criteria at times my object search fails. So even if the object is loaded, still I get a response of object not found error. When I debugged from the node object and drilled down to child/child ... hierarchy the object is there still I use to get this error. But if give multiple search criteria like "clrClassName, Name and Index, then I am not facing such errors. So to map each object with these criteria has become more time consuming for me.
2. As as framework goes, I am trying to develop a framework like this.
Each screen becomes a ODT class.
Entry Fields and verification fields become its properties
so these properties will have the Alias name mapping as their values
eg.
Field: EmployeeNo
Class Property: objEmployeeNo
Value - "Aliases.MyApp.Startup.frmEmployeeDetails.txtEmployeeNo"
Class Property: valEmployeeNo this will hold the value of the employee no field during run-time
Basic methods:
LoadObject() - which assigns the alias values to the properties.
KeyInValue() - Will key in values passed as parameters to the respective entry field
GetValue() - will assign values to the "val" prefixed properties like valEmployee the available value from the screen.
So using these above methods the person who writes a test scenario can key in values and get values and compare it against expected values. And if there is a need one add further functions to this class based on the requirement (as you walk through your test case).
3. While interpreting the manual test case, the test case entry data and verify data is passed through excel sheets.
I have written a test case using these classes. It is running fine.
So to pass data to the test case from excel, I created a dictionary object collection of the excel sheet and using it in my test case to get values. I am not sure it is a good idea. The reason I chose is I was going down several level of functions and wasn't sure how to pass the exel DDTs to them. So instead I create an instance of the collection and pass it where ever necessary.
4. Still I have to cover a lot more
a. Capturing run-time errors both from TC and running application and acting on it.
b. Function error wont be a problem as with the test case step I have success criteria. So I just have to pass or fail it.
5. After the trouble with name mapping I decided to use the direct full name of the object to access it instead of Alias object. I am halfway into writing a program to generate these classes.
This I am doing it using a user form. which will show me all the entry fields of the selected screen. In addition I can point to more controls and add them to my list. Then finally generate the class code using the list of objects selected.
I have already written a program to generate class for grids in my applications coz it is pretty simple as it has only navigate tool strip control, Save/Cancel tool strip and the grid.
Any points or suggestions or even criticism is much appreciated.