I was able to send my value to .rxlog.data file but i not able to retrieve it on Report
below if my .rxlog.data file and i want to show it on report
.rxlog file
<item
time="00:01.199"
level="Info"
category="website">
<message>
<linenumber value="5"/>
</message>
<metainfo
codefile="c:\Users\sk13\Desktop\Assignment\5-5-2014\CustomReports\CustomReports\sample.cs"
codeline="79"
loglvl="Info"/>
</item>
-------------------------------------------------------------------------------------------------------------------------
.xsl File
<td>
<i class="field">
Test Cases<b>
<xsl:value-of select="./linenumber/@value"/>
</b>
</i>
</td>
-------------------------------------------------------------------------------------------------------------------------
Please Advise
Thank you
Retrive information on Report page
Re: Retrive information on Report page
Hi skhanpara,
I think the problem is in your .xsl file. The xpath you gave is incorrect.
- either use the full path to linenumber like this: <xsl:value-of select="item/message/linenumber/@value"/>
- or use the full search: <xsl:value-of select="//linenumber/@value"/>
Hope this helps,
Zoltan
I think the problem is in your .xsl file. The xpath you gave is incorrect.
- either use the full path to linenumber like this: <xsl:value-of select="item/message/linenumber/@value"/>
- or use the full search: <xsl:value-of select="//linenumber/@value"/>
Hope this helps,
Zoltan
Re: Retrive information on Report page
Thanks a lot Zoltan
It worked
It worked
Re: Retrive information on Report page
I need Total number of test cases on my report
can you suggest me the right way to do it
also need to add Pass or Fail beside every test case
i was able to add extra column but how should i pass value?
Thank you
can you suggest me the right way to do it
also need to add Pass or Fail beside every test case
i was able to add extra column but how should i pass value?
Thank you
Re: Retrive information on Report page
Hi skhanpara,
forgive me, I am not an expert in xsl transformation. I just looked in google about "<xsl:value-of select" and I got to this page:
http://www.w3schools.com/xsl/el_value-of.asp
I used the Try It editor of the site to simulate your problem. As it turned out, it worked
But answering your questions (your question are getting harder, this may not work ):
For Total number of test cases
Use the Count() function like this:
<xsl:value-of select="count(XPATH_TO_TESTCASE)"/> in your .xsl file.
For pass and fail
Use the <xsl:value-of select=(XPATH_TO_TESTCASE_FAIL/PASS_attribute)/> in your .xsl file.
I think you should have some more informations about xml transformation:
http://www.w3schools.com/xsl/ - basic xslt tutorial on w3schools.com
http://msdn.microsoft.com/en-us/library ... .110).aspx - xslt reference on MSDN
Nonetheless, I am happy in trying to answer your questions
Best regards,
Zoltan
forgive me, I am not an expert in xsl transformation. I just looked in google about "<xsl:value-of select" and I got to this page:
http://www.w3schools.com/xsl/el_value-of.asp
I used the Try It editor of the site to simulate your problem. As it turned out, it worked
But answering your questions (your question are getting harder, this may not work ):
For Total number of test cases
Use the Count() function like this:
<xsl:value-of select="count(XPATH_TO_TESTCASE)"/> in your .xsl file.
For pass and fail
Use the <xsl:value-of select=(XPATH_TO_TESTCASE_FAIL/PASS_attribute)/> in your .xsl file.
I think you should have some more informations about xml transformation:
http://www.w3schools.com/xsl/ - basic xslt tutorial on w3schools.com
http://msdn.microsoft.com/en-us/library ... .110).aspx - xslt reference on MSDN
Nonetheless, I am happy in trying to answer your questions
Best regards,
Zoltan
Re: Retrive information on Report page
Thanks Zoltan
One last question
How can i pass a value to rxlog.data field for pass of fail of any testcase
Even i am new to XSL but a good exp
Thank a lot
all you post has helped
One last question
How can i pass a value to rxlog.data field for pass of fail of any testcase
Even i am new to XSL but a good exp
Thank a lot
all you post has helped
Re: Retrive information on Report page
Hi skhanpara,
Good to hear I could help
The short answer is: Ranorex takes care of this. If the test case runs successfully, then in the rxlog.data, the corresponding <activity> tag will contain the result.
The long answer is:
I opened one of my reports rxlog.data and I can see the pass/fail informations among the data.
The activity tag holds the "result" attribute. It contains the proper information. And also it contains the count of failed testcases of the cild test cases in
Like this:
<activity
testcasename="testCaseName"
iteration="2"
result="Success"
duration="4760ms"
type="test case iteration"
rid="10ab2dcd2cd61c3c"
totalerrorcount="0"
totalwarningcount="0"
totalsuccesscount="0"
totalfailedcount="0"
totalblockedcount="0">
The one thing you have to consider that the hierarhy of the <activity> tags are reflecting the test suite's hierarchy. Just make a test solution that contains child test cases and data connectors, run it and look at the generated rxlog.data. Make sure not to have too much iterations and test cases in it, so the rxlog.data will be consumable by normal humans like us
Kind Reagrds,
Zoltan
Good to hear I could help
The short answer is: Ranorex takes care of this. If the test case runs successfully, then in the rxlog.data, the corresponding <activity> tag will contain the result.
The long answer is:
I opened one of my reports rxlog.data and I can see the pass/fail informations among the data.
The activity tag holds the "result" attribute. It contains the proper information. And also it contains the count of failed testcases of the cild test cases in
Like this:
<activity
testcasename="testCaseName"
iteration="2"
result="Success"
duration="4760ms"
type="test case iteration"
rid="10ab2dcd2cd61c3c"
totalerrorcount="0"
totalwarningcount="0"
totalsuccesscount="0"
totalfailedcount="0"
totalblockedcount="0">
The one thing you have to consider that the hierarhy of the <activity> tags are reflecting the test suite's hierarchy. Just make a test solution that contains child test cases and data connectors, run it and look at the generated rxlog.data. Make sure not to have too much iterations and test cases in it, so the rxlog.data will be consumable by normal humans like us
Kind Reagrds,
Zoltan
Re: Retrive information on Report page
for every testcase there is a <title> tag and for my previous question
As you said to use count() function i used
count("//title")
and it works perfectly
and activity summer is over all
and i need individual test case pass or fail
and i thought of creating try catch block of individual test case and from try its pass and from catch its fail
so pass the data pass or fail based on that
my next assignment is to save all the information from report to excel sheet
Any idea?
Thanks a lot
As you said to use count() function i used
count("//title")
and it works perfectly
and activity summer is over all
and i need individual test case pass or fail
and i thought of creating try catch block of individual test case and from try its pass and from catch its fail
so pass the data pass or fail based on that
my next assignment is to save all the information from report to excel sheet
Any idea?
Thanks a lot
Re: Retrive information on Report page
Hi skhanpara,
Yes, the proper <activity> tags are holding the testcases pass/fail count. You need to figure out which activity tag is referring to the test case.
You can do the try-catch thing, but I would rather look at the <activity> tag that is around to your <title> tag. It should contain the proper pass/fail information.
The only thing you have to take care is to come up with a good enough xpath to your actual testcase.
If you could share us the rxlog.data, then we could come up with a good solution.
Best Regards,
Zoltan
Yes, the proper <activity> tags are holding the testcases pass/fail count. You need to figure out which activity tag is referring to the test case.
You can do the try-catch thing, but I would rather look at the <activity> tag that is around to your <title> tag. It should contain the proper pass/fail information.
The only thing you have to take care is to come up with a good enough xpath to your actual testcase.
If you could share us the rxlog.data, then we could come up with a good solution.
Best Regards,
Zoltan
Re: Retrive information on Report page
Thanks Zoltan