Ranorex Report and test status monitoring

Class library usage, coding and language questions.
swmatisa
Posts: 122
Joined: Fri Aug 05, 2011 7:52 am

Ranorex Report and test status monitoring

Post by swmatisa » Tue Nov 29, 2011 2: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 2853 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: 122
Joined: Fri Aug 05, 2011 7:52 am

Re: Ranorex Report and test status monitoring

Post by swmatisa » Wed Nov 30, 2011 2: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

Pavlo
Posts: 43
Joined: Fri Dec 30, 2011 10:55 am

Re: Ranorex Report and test status monitoring

Post by Pavlo » Wed Feb 01, 2012 3: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

swmatisa
Posts: 122
Joined: Fri Aug 05, 2011 7:52 am

Re: Ranorex Report and test status monitoring

Post by swmatisa » Wed Feb 01, 2012 3: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

Pavlo
Posts: 43
Joined: Fri Dec 30, 2011 10:55 am

Re: Ranorex Report and test status monitoring

Post by Pavlo » Wed Feb 01, 2012 6:03 pm

Thanks!!!

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

swmatisa
Posts: 122
Joined: Fri Aug 05, 2011 7:52 am

Re: Ranorex Report and test status monitoring

Post by swmatisa » Thu Feb 02, 2012 10: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

Pavlo
Posts: 43
Joined: Fri Dec 30, 2011 10:55 am

Re: Ranorex Report and test status monitoring

Post by Pavlo » Fri Feb 03, 2012 9:38 am

Ah, OK
Thanks!!

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

-re
Pavlo