lynMarkdigRenderTest90 1.0.0
dotnet add package lynMarkdigRenderTest90 --version 1.0.0
NuGet\Install-Package lynMarkdigRenderTest90 -Version 1.0.0
<PackageReference Include="lynMarkdigRenderTest90" Version="1.0.0" />
paket add lynMarkdigRenderTest90 --version 1.0.0
#r "nuget: lynMarkdigRenderTest90, 1.0.0"
// Install lynMarkdigRenderTest90 as a Cake Addin #addin nuget:?package=lynMarkdigRenderTest90&version=1.0.0 // Install lynMarkdigRenderTest90 as a Cake Tool #tool nuget:?package=lynMarkdigRenderTest90&version=1.0.0
Overview
RB is a package for Ranorex which outputs test results in real-time and viewable using the Bonsaih real-time display. There are two use cases for RB plugin:
- As a log monitoring tool
- As a developer tool
RB plugin as a log monitoring tool
Installing the RB plugin
- Open Ranorex Studio
- Open your Ranorex Test Suite Solution
- Go to the project you want to install RB plugin in
- From menu, select Project > Manage packages .....
- On the right panel seach box, type in the word RB
- Look for a matching package on the left with text "Ranorex plugin for Bonsaih"
- Click on this and then click on Add button.
- Accept/decline the EULA
Note : Installing RB plugin will also download and install the 30-day trial version Bonsaih viewer as you need this tool to view the log.
Using the RB plugin
- Step 1: Add the following to Program.cs file
using RBplugin;
namespace RanorexTest
{
class Program
{
[STAThread]
public static int Main(string[] args)
{
Keyboard.AbortKey = System.Windows.Forms.Keys.Pause;
int error = 0;
try
{
//----------
RBLogger rbLog = new RBLogger(@"C:\Log\MyLog.txt",
true, false, false, false);
Report.AttachLogger(rbLog);
//----------
error = TestSuiteRunner.Run(typeof(Program),
Environment.CommandLine);
}
catch (Exception e)
{
Report.Error("Unexpected exception occurred: "
+ e.ToString());
error = -1;
}
return error;
}
}
}
Step 2: Recompile the solution
Step 3: Run your tests. It will now start outputting real-time logs to text file.
Viewing the output
The Bonsaih display should automatically launch showing the real-time log.
Configuring RB plugin
RB plugin does not have a config file. Instead you specify the configuration by setting RBLogger() input parameters.
- input 1: The output file. If the file or folder does not exist, they will be created. Screenshots are written to the same folder.
- input 2: Automatically launch Bonsaih (true/false).
- input 3: Take screenshots on Passed verifications
- input 4: Take screenshots on Warning
- input 5: Take screenshots on Error
Example:
RBLogger rbLog = new RBLogger(@"C:\Test\MyLog2.txt",
false, true, false, false);
Report.AttachLogger(rbLog);
RB plugin as a developer tool
Overview
RB plugin is a great developer tool because it lets you create structured output on the Bonsaih display that is easy to read when debugging your scripts. It lets you create tree structures, attach files and screenshots, color-code text and add QA icons. Bonsaih becomes your new Console window which updates in real-time, viewable remotely on another computer, contain screenshots and file attachments, etc.
Example
// Get an instance of the current file object
RBfile log = RBfile.Instance();
// Start writing debug log
// Note: these logs will be appear together with
// Ranorex generated logs on Bonsaih display
//
log.WriteLine("line 1");
log.Blue().WriteLine("line 2");
log.WriteLine("line 3");
log.Pass().Green().Screenshot().WriteLine("this step passed");
log.Red().Fail().Screenshot().WriteLine("this step failed");
log.Screenshot().Error().Pink().WriteLine("error icon displayed");
Viewing the output
The output is viewable on Bonsaih display. It is updated in real-time.
Available Commands
Pass() : Add a pass icon to the line.
Fail() : Add a fail icon to the line.
Warning() : Add a warning icon to the line.
Error() : Add an error icon to the line.
Blue() : Color the text blue.
Green() : Color the text green.
Red() : Color the text red.
Orange() : Color the text orange.
Pink() : Color the text pink/magenta.
RGB(int r, int g, int b) : Specify the RGB color for the line.
Indent() : Add indentation to the line on the right panel.
Unindent() : Undo an indentation.
Path(string branchPath) : Set the tree structure on the left.
New lines will be added to this path.
AddBranch() : Add a pass icon to the line.
RemoveLastBranch() : Add a pass icon to the line.
RemoveBranchesFrom() : Add a pass icon to the line.
Screenshot() : Take a screenshot of the desktop and attach
to the line.
File(string path) : Attach a file to the line.
WriteLine(string msg) : Write the BTML code and msg string to the file. The BMTL code
are specified by chaining the above functions. Nothing is written to the file
until this function is called.
Learn more about Target Frameworks and .NET Standard.
-
.NETStandard 2.0
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
1.0.0 | 0 | 11/24/2020 |