Skip to content

Ranorex.com: Latest News
Syndicate content
Latest news from Ranorex
Updated: 14 hours 52 min ago

Ranorex 2.3.4 released

Wed, 08/25/2010 - 08:29
Ranorex 2.3.4 is now available and includes the following release notes: General changes/Features
  • Improved support for Visual Studio 2010 (GAC list now correctly shows Ranorex assemblies)
  • Added method to get an image of the current mouse cursor
  • Improved performance for recording and repository code generation
Bugs
  • References to repository screenshots are now updated correctly if a screenshot is renamed
  • Improved drag & drop of repository items into recorder view
  • Fixed issues with recordings not being marked dirty in Ranorex Studio
  • Allow undo/redo after saving a repository or recording
  • Report view in Ranorex Studio now correctly supports Print, Print Preview, and Save As
  • XML report is now correctly written even if Ranorex process is killed
  • EnsureVisible now supports scrolling in WinForms ScrollableContainer controls
  • The "class" attribute is no longer used for WinForms elements in RanoreXPath
  • Fixed EnsureVisible for WPF ComboBox items
  • Fixed code generation for string values containing the Unicode line separator character (U+2028)
Download and get the latest version of Ranorex here
(You can find a direct download link for the latest Ranorex version on the Ranorex Studio start page.)
Categories: Vendor

Vote for us! Finalist in ATI Automation Honors awards

Wed, 08/11/2010 - 17:11
We are proud to announce that Ranorex was selected as a finalist in the 2nd Annual Automation Honors in the following three categories:
  • Best Commercial FUNCTIONAL Automated Test Tool - .NET
  • Best Commercial FUNCTIONAL Automated Test Tool - Flash/Flex
  • Best Commercial FUNCTIONAL Automated Test Tool - Overall
Vote for us, by doing the following:
  1. Open the 2nd Annual ATI Automation Honors Voting page
  2. Play this Ranorex recording file (right-click "Save As...") to select all Ranorex radio buttons in the form :)
  3. Fill in the CAPTCHA field and submit


The ATI Automation Honors awards rely on industry practitioners to identify which tools, resources and people are the best in class. In addition, they identify which tools have the most significant upgrades, and/or which tools are setting the trends that will help to take software test automation to the next level in the coming year.
Categories: Vendor

Excel Test Automation Plug-In for Ranorex

Tue, 07/27/2010 - 22:37

With the Excel Plug-In (Beta) it is now possible to automate the content of an Excel work sheet. This plug-in is not designed solely for getting data from Excel sheets (please read Data Driven Testing here), instead it offers you the opportunity to automate the cells, rows and columns of an Excel document. For example, if you want to validate the impacts of your add-on on Excel, then the Excel plug-in is definitely the correct tool for you. In addition to access to the Excel UI elements, there are also new adapters available:

  • ExcelApplication
  • ExcelOleObject
  • ExcelRange
  • ExcelShape
  • ExcelWorkBook
  • ExcelWorkSheet

Through these adapters it is also possible to interact with the objects provided by the Excel object model.

Set up the Excel Plug-In
  1. Please close all Ranorex tools
  2. Download and extract Ranorex-Office-Plug-in.zip to following location
    “C:\Documents and Settings\All Users\Application Data\Ranorex2\Plugins” (for Windows XP) or “C:\ProgramData\Ranorex2\Plugins” (for Vista, 7)”
  3. Start Ranorex Spy and check if the Plug-in was successfully loaded. Therefore, please open the About Dialog by clicking the Ranorex Logo.

  4. <i>Excel Plug-In successfully loaded
    Excel Plug-In successfully loaded

  5. Start your Excel and it should be possible to track the elements of the worksheet.
Creating a new Project

We now create a new project, which will show briefly what’s possible with the new Excel Plug-In. In the example we perform a calculation (implemented in user code) and use one of the formulas (actions recorded by Ranorex Recorder) which should simulate an Add-On.

  1. Please create a new solution called ExcelPlugin_Test
  2. First we have to add a new reference to the project. The reference is necessary to use the adapters of the Excel Plug-In in our project. Please use following location to navigate to the Ranorex.Plugin.Office.dll
    “C:\Documents and Settings\All Users\Application Data\Ranorex2\Plugins” (for Windows XP) or “C:\ProgramData\Ranorex2\Plugins” (for Vista, 7)“
    Adding the new reference

    Adding the new reference

  3. After we successfully added the new reference, we now create a new class called SimpleCalc
  4. In this class we create two new methods: SetValuesCalc() and CheckResults(). These two methods should look like the following.
    SetValuesCalc

    /// <summary>
    /// Sets the values of the cell and carries out the calculation.
    /// </summary>
    /// <param name="sheet">The worksheet which should be used</param>
    /// <param name="value">The calculate value</param>
    /// <param name="resultCell">Your cell for the result</param>
    /// <param name="cellNames">Your cells are filled with a value. For example '"A1",A2"'</param>
    public static void SetValuesCalc(ExcelWorkSheet sheet, int value, string resultCell, params string[] cellNames)
    { int result= 0; Cell excelCell; foreach(string cell in cellNames) { //Searching for the cell excelCell = sheet.FindSingle<Cell>(".//cell[@address='" + cell +"']"); excelCell.Click(); //Enters the value by using the keyboard Keyboard.Press(value.ToString()); Keyboard.Press(Keys.Enter); //Calculates the result of all cells result= result+ Convert.ToInt32(excelCell.Text); } //Searching for the result cell excelCell = sheet.FindSingle(".//cell[@address='" + resultCell+ "']"); excelCell.Click(); //Uses the SUM Formula or Excel Keyboard.Press("=SUM(" + cellNames[0] + ":" + cellNames[cellNames.Length - 1] + ")"); Keyboard.Press(Keys.Enter); //Checks if the result of all cells equal the result cell. CheckResult(result, excelCell); }

    CheckResult

    /// <summary>
    /// Checks the result of the calculation
    /// </summary>
    /// <param name="expectedResult">Result of all cells used</param>
    /// <param name="result">The result cell of the calculation by Excel</param>
    private static void CheckResult( int expectedResult, Cell result)
    { Validate.Attribute(result, "Text", expectedResult.ToString());
    }
  5. When these two methods are done, we now need to call our calculation from the Program.cs file. For this we need the path to our worksheet. Start the Spy and track the first worksheet of our Excel book.
    Path to Worksheet
    As you can see, the new adapters are also visible in Spy. Now copy the path of the worksheet for our method.
    /*****************************************************
    * Parameter 1: Path or element for excel sheet
    * Parameter 2: Value shall be calculated.
    * Parameter 3: The address of the result cell
    * Parameter 4: The cell addresses which should have a value
    * ***************************************************/
    SimpleCalc.SetValuesCalc("/form[@processname='EXCEL']/element[@class='XLDESK']/workbook/table[@name='Sheet1']", 12, "A5", "A1","A2","A3");
  6. Let’s execute our calculation by compiling and running the whole project. (Press F5 or press the Run button)

Now we create a recording where we calculate the average value of several numbers and format the result. Thereby we show how easy it is to test an Excel Add-On with the Recorder.

  1. Create a new recording named Formula.
  2. Start recording and click the worksheet.
  3. Enter some values to the worksheet. If you finished select the “Average Formula” from the “Formulas/Recently Used” menu.
  4. Mark the values of which the average should be calculated.
  5. Right click on the result cell and select “Format Cell” of the context menu.
  6. Format your cell now.
  7. When you finished formatting your cell, validate if the result was calculated correctly.
  8. Last but not least, call the recording in the Program.cs file and execute the whole project
    //Execute recording
    Formula.Start();

You can download the sample project (Excel Project) which includes all the steps we performed in this blog. Please, don’t forget this Plug-In is still a Beta version and there is the possibility that some things might be changed.

Please send us your feedback and your suggestions to improve the Excel Plug-In.

Share/Save/Bookmark

Categories: Vendor

Eliminate dynamic attributes in generated RanoreXPaths

Thu, 07/15/2010 - 13:50

Depending on the technology of your application under test, your controls may have dynamic identifiers. You could of course adapt the path for each repository item, but you would have to do this every time a new item is added. The RxPathWeights plug-in enables you to filter out those identifiers and use an even better attribute to identify your application under test.

Set up your RxPathWeights configuration file (Ext-JS example)

Let’s assume we would like to automate a website which is built on the Ext JS framework (a cross-browser JavaScript library).

The picture below shows the RanoreXPath of an ext-js input field on following ext-js example page.

extjs-ranorex-spy

You can see containers in the path which are identified by the id, beginning with “ext-comp-” and ending with a numeric value. These ids are dynamically generated and they may change.

We would like to set up a filter mechanism which should eliminate id attributes beginning with “ext-gen” or “ext-comp-” and ending with a numeric value.

  1. Open the Ranorex Spy and analyze you application under test
  2. Navigate to the element which has the dynamic identifier
  3. Write down the attribute name and the capability to which the attribute belongs to
    ranorex-spy-attribute-capability
  4. Download and extract the “RxPathWeights.zip” to following location (only needed for the system on which you will record your test scripts):
    “C:\Documents and Settings\All Users\Application Data\Ranorex2\Plugins” (for Windows XP) or “C:\ProgramData\Ranorex2\Plugins” (for Vista, 7)
  5. Open the “Ranorex.Plugin.RxPathWeights.config” file in a text editor program

The configuration file consists of a rule element and an underlying condition element. The rule element enables you to change the weight of an attribute. By setting the weight to zero, the element will not be used in the RanoreXPath as an identifier anymore.

The condition element enables you to specify a rule for the attribute. In our sample, we would like to filter out ids which match following regular expression syntax
“(ext-gen|ext-comp-)[0-9]*”. (Read more about regular expression syntax here…)

<rxpathweights> <rule capability="webelement" attribute="id" setweight="0" conditionsoperator="or"> <condition source="self" attribute="id" match="(ext-gen|ext-comp-)[0-9]*" negate="false"/> </rule>
</rxpathweights>

Save the config file and restart the Ranorex tools to load the RxPathWeights plug-in.

RxPathWeights plug-in documentation

Role parameters:

  • capability/attribute: define the target capability/attribute of the rule
  • setweight: the weight to set if all the conditions evaluate to true
  • conditionsoperator: defines the operator (”and” / “or”) that is used to combine the outcomes of multiple conditions in a rule

Condition parameters:

  • source: can be self/parent/toplevel
  • attribute: the attribute name to match. Can be different from the rule attribute name
  • match: a regular expression. If you don’t specify the match value, the value of the attribute needs to be null to match
  • negate: the outcome of the condition is the negated outcome of the match, e.g. if negate=”true” and the match fails, the condition evaluates to true

Share/Save/Bookmark

Categories: Vendor

Looking for a Test Automation Support Engineer

Thu, 07/08/2010 - 16:17
Categories: Vendor

Ranorex 2.3.3 released

Thu, 07/08/2010 - 08:50
Ranorex 2.3.3 is now available and includes the following release notes: Bugs
  • Fixed upwards compatibility of Ranorex recordings with external repositories
  • Fixed possible NullReferenceException in Ranorex Studio integrated Recorder
  • Fixed compatibility with LabVIEW plugin
  • Fixed EnsureVisible for a special class of dialog windows
  • Fixed selected attribute in option tag for Mozilla Firefox
Ranorex 2.3.2 release notes: General changes/Features
  • Improved performance and memory footprint for repositories with large screenshots
  • Improved recording of drag & drop operations
  • Adobe AIR automation libraries have been updated to AIR 2.0 release
  • XML logger now supports custom titles and stylesheet URLs
  • Image validation now always adds images to the report if validation fails
  • Added possibility to disable generating report messages for validation
  • Generated repositoriy code now contains a public constructor
  • Improved EnsureVisible for web elements
  • Ranorex Studio solutions now create a *.sln file for use in Visual Studio
  • Improved start time for Ranorex applications
  • Added support for Mozilla Firefox 3.6.4 and higher
Bugs
  • Fixed OutOfMemoryExceptions caused by repositories with large screenshots
  • Fixed memory leak when automating WinForms applications
  • Fixed possible exception when automating WinForms applications using the 32/64 bit bridge
  • Fixed drag & drop of items in a recording
  • Fixed NullReferenceException in Studio related to Sidebar configuration
  • Fixed getting/setting valueless attributes ("checked", "readonly", "disabled", "selected") for web input elements
  • Fixed coordinates/visibility calculation for option web elements
  • Empty attributes are now correctly handled for web elements in Mozilla Firefox
  • Fixed possible exception when executing PerformClick on a web element that opens a new window
  • Images in XML report are no longer overwritten if AppendExisting is set
  • Fixed calculation of Visible attribute for list items in WPF combo boxes
  • Fixed support for hidden columns in Flex datagrid
Download and get the latest version of Ranorex here
(You can find a direct download link for the latest Ranorex version on the Ranorex Studio start page.)
Categories: Vendor

Announcing the LabVIEW Test Automation Plug-In

Thu, 07/01/2010 - 10:01
LabVIEW makes it easy to design and build graphical user interfaces (GUIs), but it’s important to ensure that it is possible to test these interfaces in a repeatable and automated fashion throughout the development life-cycle.

We are proud to announce the LabVIEW Plug-In, which is one of its kind and built in cooperation with NTESystems GmbH. This LabVIEW Plug-In enables automated testing of your LabVIEW VIs. 

Read more about LabVIEW Test Automation Plug-In hereLabVIEW Test Automation Plug-In
Categories: Vendor

Organizing a Test Automation Project with Ranorex Studio

Tue, 06/29/2010 - 16:15

There are many different possibilities for organizing a Ranorex Studio test automation project. The main goal when doing professional test automation with Ranorex is to create reusable automation modules. This can be realized by distinguishing between commonly used automation modules which perform actions like starting an application and specialized test modules performing a narrowly defined task.

ranorextestsolution1

The test project solution consists of:

Note: The important point is to separate execution and test case definition from the automation modules.

EXE Project – ‘Execution’

The executable project specifies the test cases of the solution and defines how each test case is triggered. Additionally, a ‘Setup’ method initializes the system under test (e.g. starting the application) while the ‘TearDown’ method cleans up the system be-fore the next test case is started (e.g. closing an application). Each test case is implemented within single files and classes:

testcaseclasses

The test case refers to the ‘AddVip’ recording which is part of the ‘VipTestLibrary’ DLL project. To reuse a method or class implemented within another project, a reference to the project has to be added.

addprojectreference

Library Project - ‘VipTestLibrary’

A library project can be created by adding a new project to the solution. The project template ‘Ranorex Class Library’ is part of the ‘Advanced’ folder shown within the ‘New Project’ dialog wizard.

Creating a new library project

The reason for having a Ranorex class library is to manage the modules (recordings or pure code based classes and methods) separated from the execution project. All recordings are stored within the ‘Recordings’ folder while the modules, totally based on user written code, are part of the ‘Code’ directory. Also the repository, which manages all the UI elements of the application under test, is part of the library project.

Common Class Library – ‘Common’

It’s not required to have an additional library implemented to handle common methods like starting or closing the system under test. Regardless, when thinking about other test projects or solutions which require a common method like killing a process in order to shut down an application in cases of errors, it would be good to have one robust mechanism for that purpose. In comparison to the ‘VipTestLibrary’, the ‘Common’ class library project does not have any information about the application under test. Everything required for UI automation is provided by parameters.

commonmethods

Add the ‘Common’ library as reference in order to reuse the classes and methods implemented within it.

Test Case Execution

In that example the execution is triggered by a simple batch file, which specifies the execution sequence:

cd bin\debug
call execution.exe -tc addsinglevip
call execution.exe -tc savevip
call execution.exe -tc connecttodatabase

It’s possible to evaluate the return values (FAIL=-1, SUCCESS=0) at the command line interface as well. In addition a command line based execution is supported by many test management tools. That helps to ease integration of Ranorex tests into existing execution environments.

Download the Ranorex Studio solution “VIP Test Solution” here.

Share/Save/Bookmark

Categories: Vendor

Roadshow “Test Automation Out of the Box” through Germany

Thu, 05/27/2010 - 13:43
This June Ranorex attends this year’s Imbus Roadshow “Test Automation Out of the Box” through Germany. Take the advantage and meet the experts in test automation at Hamburg, Bonn, Frankfurt, Nürnberg, or Munich. Please find details in German below.

Lohnt sich Testautomatisierung in der Praxis? Wir meinen - Ja! Und zeigen: Wie kommt man schnell und erfolgreich zum vollautomatisierten Softwaretest.

"Trends in Testing – 2010“ ist das Forum, um sich kompakt und umfassend zu allen Fragen rund um das Thema Testautomatisierung zu informieren. Gemeinsam mit den führenden Tool-Herstellern geben wir Ihnen einen einmaligen Marktüberblick über die wichtigsten aktuellen Tools und zeigen auf, welchen Mehrwert und welche Einsatzmöglichkeiten Ihnen Testautomatisierung heute bietet – „out of the box“!

Im Rahmen der Veranstaltung stehen Ihnen unsere Experten und Referenten unter dem Motto "Meet the Experts" natürlich auch für Ihre individuellen Fragen gerne zur Verfügung.

Die Termine:

08. Juni 2010     Historische Speicherböden Hamburg
10. Juni 2010     Rheinisches LandesMuseum Bonn
11. Juni 2010     Saalbau Gutleut Frankfurt am Main
15. Juni 2010     Ofenwerk Nürnberg
17. Juni 2010     Innside by Meliá München Parkstadt Schwabing

Die Veranstaltung ist kostenfrei und beginnt jeweils um 09:30 Uhr.

Die ausführliche Programmbeschreibung, alle Termine und Ihr Anmeldeformular finden Sie im Internet unter www.trends-in-testing.de.

Für die Veranstaltung lade ich Sie herzlich ein, den Tag beim anschließenden Get-Together gemeinsam gemütlich ausklingen zu lassen.

Freuen Sie sich auf anspruchsvolle Vorträge und anregende Diskussionen mit unseren Experten!

Categories: Vendor

Customizing Ranorex Reports

Wed, 05/26/2010 - 14:33

When you run your daily user interface tests, the key point is to review the results of the individual tests. You want to know which tests succeeded and which failed, and maybe want to be notified of the results. Additionally, you might want the style of the reports to match the corporate identity design. Ranorex provides you with a flexible and customizable reporting engine that you can adapt to fit your needs.

This blog shows you how to:


Customizing the default Ranorex XML report

You can easily customize the default Ranorex XML report by providing a new style sheet that is used to format the plain XML logging data to an HTML page. For example, by adding following XSL code to the default “RanorexReport.xsl” style sheet you get a summary heading at the top of the report page:

<h2>Summary: <xsl:choose> <xsl:when test="//message[@level='FAILED' or @level='ERROR']"> <span class="failure">FAILED</span> </xsl:when> <xsl:otherwise> <span class="success">PASSED</span> </xsl:otherwise> </xsl:choose>
</h2>

In order to use the custom style sheet you have to add following line of code in your Ranorex code before the call to Report.Setup:

// set a custom stylesheet for the default XML report
XmlLogger.SetReportStylesheetFile("CustomStylesheet.xsl"); // append to an existing file with the same name
Report.Setup(ReportLevel.Info, logFileName, true);

Show report summary by customizing XSL style sheet

In the same way you can edit the style sheet to match your corporate identity design. The above report also shows how to add plain HTML to the report, e.g. adding a link to www.ranorex.com:

// add some custom HTML message to the XML report
Report.LogHtml(ReportLevel.Info, "Link", "<a href='http://www.ranorex.com/'>Visit www.ranorex.com!</a>");

For a detailed description on how to use the Ranorex reporting see the corresponding Ranorex User Guide section:
http://www.ranorex.com/support/user-guide-20/reporting-logging.html

For an instruction on how to add additional data to the default XML report see the following forum post:
http://www.ranorex.com/forum/report-appending-in-2-2-t1101.html#p5043

Create a custom reporting mechanism

In order to store Ranorex reports to a database or send them by email, you have to create a custom logger class and attach it to the Ranorex report engine. This logger class has to implement the Ranorex.Core.IReportLogger interface that defines methods called by the report engine. Basically, there are four methods that you have to implement:

  • Start/Stop: These two methods are called when a new report should be created and when a report should be closed, respectively. In the start method you would, for instance, create a new report file, email, or database connection to store the actual messages. In the Stop method you would close the file and database connections, or send the email.
  • LogText/LogData: These two methods perform the actual storing of text and data messages. Usually, you take the method arguments passed by the report engine, format them, and store them in a particular way; e.g. write them to a file, insert a new row into a database, or add a new line to an email.

For demonstration purposes I will show you how send reports via email. We start by adding a new class MailLogger that implements the IReportLogger interface:

public class MailLogger : IReportLogger
{
}

If you use Ranorex Studio, you can right click on IReportLogger and select “MailLogger -> Implement Interface (implicit) -> IReportLogger” and Ranorex Studio will create stubs for the interface methods for you. In the constructor of our new class we create a new MailMessage that is sent when the report is finished, i.e. when the End method is called:

public MailLogger(string from, string to, string subject)
{ mail = new MailMessage(from, to); mail.Subject = subject;
}
public void End()
{ try { SmtpClient smtpClient = new SmtpClient(Host, Port); smtpClient.Send(mail); } catch (Exception ex) { Console.WriteLine(ex); }
}

The actual storing of report messages to the email is done in the LogText method, where we format the arguments by the report engine and store the formatted string to the email body:

public void LogText(ReportLevel level, string category, string message, bool escape)
{ mail.Body += string.Format("[{0}][{1, -7}][{2}]: {3}n", GetTimeStamp(), level, category, message);
}

The last thing we have to do is create a new instance of our MailLogger class and attach it to the Ranorex report engine. This code needs to be placed before or right after the call to Report.Setup, typically in the Main method (in the Program.cs file) of your application:

MailLogger mailLogger = new MailLogger("from@domain.com", "to@domain.com", "Ranorex Report for CustomLogging");
Report.AttachLogger(mailLogger);

Don’t forget to set the MailLogger.Host property to the host name of your SMTP server:

MailLogger.Host = "yourSmtpServer";

When you run the test, additionally to the standard XML and console reports you will get a report sent via email:

Report sent via email

Report sent via email

Summary

The Ranorex report engine allows you to customize the existing XML/HTML based reports as well as create your own reporting mechanism by implementing the IReportLogger interface. In this blog I demonstrated how to use a custom XSL style sheet to add a summary to the default XML report and how to send reports via email. Download the complete project containing the MailLogger class and the customized XSL style sheet using the following link:

Ranorex Studio project illustrating report customizing (including HTML MailLogger and custom XSL style sheet)
UPDATE: The MailLogger class in the project above now creates HTML emails, too!

If you have any questions or suggestions, please don’t hesitate to post your comments to this blog!

Share/Save/Bookmark

Categories: Vendor

Ranorex at STAREAST 2010

Wed, 05/19/2010 - 15:10
The conference allowed us to meet potential and existing clients in person, which is always nice, especially in this day and age of business. I hope we were successful in answering all of your questions about Ranorex, and our capabilities in test automation.

Our philosophy is to bring testers and developers together, in an effort to make test automation projects as successful as possible.

Ranorex at STAREAST 2010
Categories: Vendor