In am setting up a test. I made edits to the default.xls so that my datatables have the most current copy of the test plan so I do not have to import anything... "it is all there. Now as I perform test and populate the Pass/Fail I am going down the list sequentially and populating based on test results.
Sheet name to TestPlan and the first parameter on that sheet is "Task" and there is a naming convention there. TP01.01, TP01.02, 03 .. and so on.
Issue is when coding it is cell specific, so after a test is preformed it places pass or fail in parameter "PassFail" on the "TestPlan" sheet. However there are folks that want to add, take away and move tasks around.
If I have the result determined in a variable called "TaskResult", is there a way to search a sheet for a task, when found enter the value of TaskResult in the parameter "PassFail" of the row? This way it does not matter the sequence of the Tasks, and it is driven by the written tests that are occurring by the code. If that Task is not coded yet, I can put a default of "NotCoded" in the cell that are left in the PassFail parameter that are blank.
Has anyone done this before? and is there any suggested code that I could use for this? Trying to get a design direction on how to get around having to statically assigning values in a datatable.
Please advise and thanks. -R-
the code that I am thinking is:
Sheet name to TestPlan and the first parameter on that sheet is "Task" and there is a naming convention there. TP01.01, TP01.02, 03 .. and so on.
Issue is when coding it is cell specific, so after a test is preformed it places pass or fail in parameter "PassFail" on the "TestPlan" sheet. However there are folks that want to add, take away and move tasks around.
If I have the result determined in a variable called "TaskResult", is there a way to search a sheet for a task, when found enter the value of TaskResult in the parameter "PassFail" of the row? This way it does not matter the sequence of the Tasks, and it is driven by the written tests that are occurring by the code. If that Task is not coded yet, I can put a default of "NotCoded" in the cell that are left in the PassFail parameter that are blank.
Has anyone done this before? and is there any suggested code that I could use for this? Trying to get a design direction on how to get around having to statically assigning values in a datatable.
Please advise and thanks. -R-
the code that I am thinking is:
Code:
'Not sure how to tell QTP to use the "TP01-TestPlan" action sheet.
row_count = DataTable.GetRowCount
For i=1 to row_count
temp = DataTable.Value("Task_ID")
If temp = "TP01.11" then
Msgbox("Found It")
SetCurrentRow(i)
'Need to add here the adding of whatever the value is of variable "PassFailResult
'in the parameter "PassFail
End If
Next