Ranorex Report and test status monitoring : Automation API

Ranorex Report and test status monitoring

Class library usage, coding and language questions.

Ranorex Report and test status monitoring

Postby swmatisa » Tue Nov 29, 2011 3:27 pm

WinXP SP3 (WindowsUpdate done)
Ranorex 3.1.2
*********************************
Hello,

I try to create a status (x Success, y Failed, z Blocked) to monitor the progress of my tests. To do this I try to use the IReportBuilder Interface.

To be sure how you present your results (in the rapport), I do a sample :
RanorexReport.png
RanorexReport.png (60.86 KiB) Viewed 175 times


I log all call to LogText-LogData and I found the following rules :
1) Treat when metaInfos contains (key, value) activity;testcaseiteration
2) Treat when metaInfos contains (key, value) activity;testcase except if last call contain activity;testcaseiteration

Are the following rules OK?

Best regards
SW
swmatisa
 
Posts: 54
Joined: Fri Aug 05, 2011 8:52 am

Re: Ranorex Report and test status monitoring

Postby swmatisa » Wed Nov 30, 2011 3:36 pm

Hello,

I implement a class with IReportBuilder Interface. I can now see remotely (with an UdpClient) the number of passed, failed, blocked tests.

I also add the "pause and play" for running project.

Thanks for this great product
SW
swmatisa
 
Posts: 54
Joined: Fri Aug 05, 2011 8:52 am

Re: Ranorex Report and test status monitoring

Postby Pavlo » Wed Feb 01, 2012 4:25 pm

swmatisa wrote:Hello,

I implement a class with IReportBuilder Interface. I can now see remotely (with an UdpClient) the number of passed, failed, blocked tests.

I also add the "pause and play" for running project.

Thanks for this great product


Hi
"Great mind think same"
I'm going to implement something like you did.
Can you share your solution or give bit more details on how you did that?

-regards
Pavlo
Pavlo
 
Posts: 17
Joined: Fri Dec 30, 2011 11:55 am

Re: Ranorex Report and test status monitoring

Postby swmatisa » Wed Feb 01, 2012 4:54 pm

Pavlo wrote:Can you share your solution or give bit more details on how you did that?

Sorry, I cannot give my full project, but some abstract.

You must treat each IReportLogger.LogText and IReportLogger.LogData with something like this:
...
		const string k_Activity = "activity";
		const string k_Testcase = "testcase";
		const string k_TestcaseIteration = "testcaseiteration";
		const string k_Result = "result";
		const string k_Resultfailed = "Failed";
		const string k_ResultIgnored = "Ignored";
		const string k_ResultSuccess = "Success";
...
			bool l_Treat = false;
			if (!metaInfos.ContainsKey(k_Activity))
			{
				return;
			}
			switch (metaInfos[k_Activity])
			{
				case k_Testcase:
					l_Treat = !m_LastOperationIteration;
					m_LastOperationIteration = false;
					break;
				case k_TestcaseIteration:
					l_Treat = true;
					m_LastOperationIteration = true;
					break;
				default:
					m_LastOperationIteration = false;
					break;
			}

			if (l_Treat)
			{
				switch (metaInfos[k_Result])
				{
					case k_ResultSuccess:
						m_Passed++;
						break;
					case k_Resultfailed:
						m_Failed++;
						break;
					case k_ResultIgnored:
						m_Blocked++;
						break;
					default:
						// Do Nothing
						break;
				}
				SendUpdate();  // Send m_Passed, m_Failed, etc. by ...

I hope this help :D
SW
swmatisa
 
Posts: 54
Joined: Fri Aug 05, 2011 8:52 am

Re: Ranorex Report and test status monitoring

Postby Pavlo » Wed Feb 01, 2012 7:03 pm

Thanks!!!

May be you also can share couple of lines for pausing/resuming tests?
Pavlo
 
Posts: 17
Joined: Fri Dec 30, 2011 11:55 am

Re: Ranorex Report and test status monitoring

Postby swmatisa » Thu Feb 02, 2012 11:51 am

Pavlo wrote:May be you also can share couple of lines for pausing/resuming tests?

You must treat each IReportLogger.LogText and IReportLogger.LogData with something like this:

The principle is to check if a "Pause" command has been sent and after wait on "Resume" command (pseudo code):

Code: Select all
if PauseSent
   While !ResumeSent
      Sleep
   endwhile
endif
TreatmetaInfos   // LastPost
SW
swmatisa
 
Posts: 54
Joined: Fri Aug 05, 2011 8:52 am

Re: Ranorex Report and test status monitoring

Postby Pavlo » Fri Feb 03, 2012 10:38 am

Ah, OK
Thanks!!

I thought that you are using some ranorex method to pause test execution.

-re
Pavlo
Pavlo
 
Posts: 17
Joined: Fri Dec 30, 2011 11:55 am


Return to Automation API

Who is online

Users browsing this forum: No registered users and 0 guests