Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
QTP and QC issue_During run time
#1
Not Solved
[/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

..
Reply
#2
Not Solved
Hi,

Could u please post ur code so that we can have a look at the problem.

Regards,
Sankalp
Reply
#3
Not Solved
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
Reply
#4
Not Solved
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
Reply
#5
Not Solved
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
  strCurrentTestName=""
Else
  strCurrentTestName=QCUtil.CurrentTest.name
End IF


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
    If QCutil.CurrentRun is Nothing then Exit

    Dim oFactory, oFilter, oIteration, sIteration
    Set oFactory = QCUtil.CurrentRun.StepFactory
    Set oFilter = oFactory.Filter

    'Filter only iteration steps only. The current iteration
    'will be the last one
    oFilter("ST_STEP_NAME") = """Test Iteration*"""

    'Get the last iteration
    Set oIterations = oFactory.NewList(oFilter.Text)

    'Filter outer the iteration no.
    strComponentName = oIterations.Item(oIterations.Count).Name

Regards,
Ankesh
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Loading QRS files at Run time dvkbabu 2 10,007 03-24-2017, 09:04 PM
Last Post: UrmilaSaha
  Missing Resources, Information Pane, Debug Viewer, Run time Data Table not visible Aurodeepta 3 6,967 05-28-2015, 02:52 PM
Last Post: Aurodeepta
  Object Identification not working on Run Time Ajatshatru 2 3,253 05-06-2015, 07:27 PM
Last Post: Ajatshatru
  Error while adding Object to Object repository at run time SaranKumarV 3 8,633 02-02-2015, 01:40 AM
Last Post: dubeyvin
Rolleyes How can we run QTP on virtual machine at scheduled time through VB script. ritugoyal 13 22,562 11-23-2012, 11:03 AM
Last Post: vinod123

Forum Jump:


Users browsing this thread: 1 Guest(s)