Thread Rating:
  • 1 Vote(s) - 4 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to set Test case status?
#1
Solved: 11 Years, 3 Months, 4 Weeks ago
Hi All,

I am going through a test case in which I need to compare two values,
following is my code.
Code:
a=datatable("Checked_Text",dtGlobalSheet)
b=datatable("B",dtGlobalSheet)
If strcomp(a,b)=0 then
PASS Testcase
Else

FAIL Testcase

endif

I wonder how to do it? Like the PASS and FAIL ?
Reply
#2
Solved: 11 Years, 3 Months, 4 Weeks ago
Hi,Use reporter. report event , it will help u out.

Regards,
Sankalp
Reply
#3
Solved: 11 Years, 3 Months, 4 Weeks ago
Code:
If strcomp(a,b)=0 then
reporter.reportevent micpass, "stepname", "comparison pass"
Else
reporter.reportevent micfail, "stepname", "comparison fail"
end if
Reply
#4
Solved: 11 Years, 3 Months, 4 Weeks ago
Hi Sankalp,
i suggest u to use instr function instead of "if" and u cant find ur ans with instr function. thin klittle logically(if u r 3 years exp ,u will get my point). let me know if any concerns

Thanks u
Shrikant Deyannavar
Reply
#5
Solved: 11 Years, 3 Months, 4 Weeks ago
Hi Shrikant Deyannavar,

Kindly go through the post correctly before giving any comments, I had not suggested to use "if" , it was 'avinash_learnqtp' who proposed this solution , I suggested to use report.report event, So it will be very nice and gentle of u if u read correctly first and then give ur usefull comments to the concerned person, as an IT professional these are the basic which u should know. Cool
Regards,
Sankalp
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Select case is not being executed in a Function Anupama 1 1,612 05-25-2018, 11:15 AM
Last Post: Anupama
  Using Range in Select Case Statement Studymode 0 1,506 12-14-2017, 06:18 PM
Last Post: Studymode
  Using Select Case Statement Studymode 0 11,720 12-13-2017, 05:55 AM
Last Post: Studymode
  Case changes while reading values from inbuilt datatables krishnakittu03 3 2,973 04-28-2015, 11:34 AM
Last Post: kbhargava505
  How to send QTP status results to mobile Naresh 0 3,026 09-02-2014, 03:50 PM
Last Post: Naresh

Forum Jump:


Users browsing this thread: 1 Guest(s)