QTP and QC issue_During run time - Printable Version +- Micro Focus QTP (UFT) Forums (https://www.learnqtp.com/forums) +-- Forum: Micro Focus UFT (earlier known as QTP) (https://www.learnqtp.com/forums/Forum-Micro-Focus-UFT-earlier-known-as-QTP) +--- Forum: UFT / QTP Others (https://www.learnqtp.com/forums/Forum-UFT-QTP-Others) +--- Thread: QTP and QC issue_During run time (/Thread-QTP-and-QC-issue-During-run-time) |
QTP and QC issue_During run time - leema - 06-14-2012 [/u]Hi, While executing a newly developed bussiness component from QTP.The method QCUtil.CurrentTest.name shlod not return any value.It should be "". But I am getting some value which is randomly picking the name of the bussiness process from the test plan. But I want this value to be "". Please help me out to resolve this issue. -Regards, Leema Mishra .. RE: QTP and QC issue_During run time - sshukla12 - 06-14-2012 Hi, Could u please post ur code so that we can have a look at the problem. Regards, Sankalp RE: QTP and QC issue_During run time - leema - 06-14-2012 hi Sankalp, If I create a blank scripted component and save it in the bussiness component TAB of QC.Just write the line of code as msgbox QcUtil.Currenttest.name then save it again.Try to run it then some junk value is getting captured by this method. Purpose of Doing the same: This is part of the work around while facing issues with the existing framework. Initially I was thinking it is the problem in the exsting function library which is helping to create the result. e.f.if we execute bussiness component from QTP,the result should be appeared as <BussinessComponent_Componentname_Datetme> If it is from Test Plan then the result displayed as <Bussiness process_Bussinessprocess name_Datetime> If from Testlab,it will ceate a testset folder in the log result and then <Bussiness process_Bussinessprocess name_Datetime> For this reason I have used this line of code in the function library.Previously it was working fine(from last 1 year).But i reinstalled QTP,QC again but this line of code is giving some junk value due to which the result is populating but the naming convenion of the file is taking that junk value. This space is not enough to past the entire function library. Please help me out for resolving the issue. -Regards, Leema Mishra RE: QTP and QC issue_During run time - sshukla12 - 06-14-2012 Hi, I can help u in getting the script name from lab & test plan..since I had not worked on business components. Let me know if this is ur requirement Regards, Sankalp RE: QTP and QC issue_During run time - Ankesh - 06-14-2012 Hi Leema, can you try adding this code..Usually if you run the component from QTP, current run will be nothing.. you can give it a try by adding the below code. Code: If QCutil.CurrentRun is Nothing then You can also get the running component name in QC by using the below code Code: 'If results are not stored in QC then function is not valid Regards, Ankesh |