Subscribe to Methods & Tools
if you are not afraid to read more than one page to be a smarter software developer, software tester or project manager!
Subscribe to Methods & Tools
if you are not afraid to read more than one page to be a smarter software developer, software tester or project manager!
Long gone is the time of waterfall’s strictly separated development & testing phases. Today, it’s all about fast feedback, quick iterations and frequent releases at a previously unseen velocity. It requires an agile methodology to keep up with the high demands. Your team’s success depends on a supporting infrastructure with the right tooling. Without any doubt, automation plays an essential role here. Our tip: Integrate test automation into your continuous integration (CI) process.
We wouldn’t want you to waste precious time if you’ve your development environment already set up. That’s why you can integrate Ranorex into any continuous integration process. Let’s have a closer look at the benefits of integrating test automation into your CI system, and how you can do it:
Automated testing and continuous integration
The idea of continuous integration is to frequently promote code changes and rapidly get feedback about the impact these changes have on the application or system. Including test automation in the development cycle enables you to automatically test each incremental code change.
So basically every time a developer commits code changes to the version control system (VCS) such as Git or TFVC, a build of the application under test as well as the Ranorex test automation project is triggered in the CI system. The resulting test automation executable then runs against the application under test.
To evaluate the outcome of the automated test, the continuous integration tool examines the return value of the executable or its output text (e.g. “TEST FAILED” for failure). With Ranorex, the return value â0′ signals the successful execution of the test script, while the return value â-1′ signals a failure. Each team member automatically receives a notification about a finished build. This notification includes build logs as well as a test execution report.Advantages of integrating Ranorex into your CI system:
Note: You have to install Ranorex on each machine you’d like to execute Ranorex tests on. You’ll need a valid license to do so. Please find more information about Ranorex licenses on our dedicated Pricing page.
Each committed change in the application under test and the test automation project should be automatically tested. In other words, every change should trigger these 3 steps:
First, you need to manually set up these steps in your CI system.1. Build the application under test
The first build step should generate an executable of your application under test. This executable should later be triggered from the Ranorex test suite project.
Thus, add a build step which will build your application under test (e.g. MSBuild build step, Ant build step, âŠ).
In this second step, you’ll need to generate an executable to automate your application under test. To do so, add a build step (MSBuild or Visual Studio) and choose the project file (*.csproj) of your Ranorex project which should be built.3. Execute the Ranorex test suite
The third step should execute the previously created executables. Simply add an execution step triggering the *.exe file of the test automation project and define the command line arguments if needed.
The test execution should now be triggered on the same system the projects were built on. If you want to trigger the execution on another system, you need to deploy the built executables and all connected files to that system. Please make sure to execute the application under test and the Ranorex test suite in a desktop and not in a console session.Automated testing of frequent code changes
If the code of your application under test or your test automation project changes frequently, it doesn’t make sense to run the entire test suite including all test cases with every build. Instead, you should run only those test cases that are affected by the changes. How? Run configurations!
You can add and edit run configurations directly in the test suite (see user guide section âRunning a Test Suite’).
You can trigger a run configuration using a command line argument. The following command line, for example, will run the test suite executable âTestCIProject’ with the run configuration (/rc) âSmokeTest’ and generate a zipped report file (/zr /zrf) âReport.rxzlog’ in the folder â/Reports/’.
TestCIProject.exe /rc:SmokeTest /zr /zrf:Reports/Report.rxzlog
Interested in more command line arguments? You find more in the user guide section âRunning Tests without Ranorex Studio‘.Test automation report â the importance of feedback
“No news is good news” is definitely not true for agile teams. It’s important that everyone in a team â whether it is a developer or tester â knows about the state of the code and, thus, the outcome of the automated test run. It really couldn’t be any easier: Simply add a post build action which sends a mail to your team members with the build log and the generated zipped report attached.Integrate Ranorex into a specific CI system:
You’re using a specific CI tool? Whether it’s Bamboo, Jenkins, HP Quality Center, TeamCity or Microsoft Test Manager â check out the section below to find a detailed instruction on how to integrate Ranorex into your CI tool!
As you can see, it’s easy to integrate Ranorex test automation in your continuous integration system. Each code change in your application under test and your test automation project will be automatically tested, which enhances transparency and enables you to find bugs faster.
You want to know about the benefits of integrating Ranorex into your development environment? Try it out! Download the full-featured 30-day Ranorex trial and see the benefits for yourself! Have fun integrating!
The post Integrate Automated Testing into Any Continuous Integration Process appeared first on Ranorex Blog.
Multiple releases, limited resources, time pressure and a team with mixed skillsets. And itâs your task to create flexible, maintainable automated tests, which every team member can understand and work with. The solution: get a test automation tool that supports keyword-driven testing.What is keyword-driven testing?
The keyword-driven testing approach separates the test automation implementation from the test case design. A keyword is defined for each action in the test case. Once the keyword is set, you donât need any programming knowledge to easily design and maintain the automated tests.What are the benefits of keyword-driven testing?
There are two ways of creating keyword-driven tests with Ranorex:
You can use both your recording and code modules in Ranorex Studio as a basis for keyword-driven testing. Simply split your automation modules and give them each a clearly understandable name. For example, you can define a set of actions, which start the system under test, as a module with the name âStartSUTâ. You can find detailed information on how to do so in this user guide section.
These modules now function as keywords. Once the keywords are defined, you can drag and drop the keywords needed for your test directly from the module browser into your test suite.Reuse keywords in multiple projects
Start by creating your keywords directly in a Ranorex test suite module library. You then use these keywords in multiple Ranorex projects by referencing back to this library. You can do so in two different ways:
This approach completely separates the keyword implementation from the test case design and the keyword usage.
If you want to learn more about organizing test automation projects, please read this blog post: âOrganize a Test Automation Project with Ranorexâ.Use external data in keyword-driven tests
You can make your tests even more flexible by using variables. Variables enable you to automatically retrieve external data, which youâve saved in an Excel or CVS sheet, in your tests â such as passwords for login actions. You can find detailed information on how to implement this type of testing in our user guide section “Data-Driven Testing“.
We bet youâre familiar with the good old Excel-spreadsheet. So why not use something you already know well in your automated tests? When using the action table in the Ranorex Recorder, you can create keyword-driven tests in a table-like workspace. It just takes a little trick to access your predefined keywords within this view: Inheritance.
A recording module, which is inherited from a code module, automatically derives all functionalities from its parent module. This is also true for parameters â you can read more about this topic in the user guide section âUser Code Actions and Parametersâ.
This can be achieved with inheritance in the recording modules âUserCode.csâ file:
Now, you can simply add a user code action in the action table (Add New Action -> User Code) and choose a predefined keyword. Once youâve defined it, you can set the argument.
You can also use data-driven testing within the recording module by simply making the keyword parameters variable as explained in the user guide section “Data-Driven Testing“.Conclusion
Keyword-driven test automation is a fantastic way to create flexible test cases. It enables teamsÂ with different technical background to work on test automation projects together, while keeping test clearly structured and easily maintainable.
Conferences are always a fantastic way to meet people and exchange ideas with other test automation experts. The Test Automation Day is a major software testing conferencesÂ thatÂ is dedicated to test automation. This year, it took place in Rotterdam, the Netherlands, on June 23rd. This inspiring conference was packed with test automation experts, software testing professionals and leading IT organizations. Not only did we get to listen to thought-provoking keynotes, but also had interesting talks at our Ranorex booth. Here are some of the most frequently asked questions at our booth:Is Ranorex just a Capture & Replay tool?
Ranorex is more than a just simple Capture & Replay tool. ItÂ is a versatile test automation software that offers a range of tools suitable for every skill level. While you donât need any programming skills to create and maintain your tests with the Ranorex Recorder, you can also create you automated tests manually.How can I create my automated tests without using the Ranorex Recorder?
Test automation engineers will especially love the Ranorex Spy. It is a powerful tool that enables you to obtain UI elements from your application under test. Simply open the Ranorex Spy in Ranorex Studio and track the UI elements you want to automate. You can drag these elements directly from the Ranorex Spy into the central Ranorex Object Repository. From there, you can then further drag them either into the action table, or the code editor. Hereâs where it gets interesting: usually, UI elements are used more than once in each test case. When adapting an element in the central repository, this change will be true for all occurrences of this element â both in code and in the action table. The benefit? You donât have to adapt each element manually, which will save you a lot of time.http://www.ranorex.com/blog/wp-content/uploads/2016/07/AutomateWithoutRecording.mp4 How does Ranorex support the collaboration between developers and domain testers?
The Ranorex Object Repository is the central point of collaboration between developers and domain testers. This central repository is used to manage UI elements. When you record a UI element with the Ranorex Recorder, or track an element with the Ranorex Spy, Ranorex will automatically create a repository element in this central repository. Thus, when changingÂ a repository element in the Ranorex Object Repository, the changes are automatically applied both in the code and the recording module. This does not only ease team collaboration, but also test maintenance.How does Ranorex support creating and editing test automation projects in code?
If youâre into coding, youâll benefit from the Microsoft .NETÂ framework and can write code in C# and VB.Net. Youâll also love the new code editor enhancements, which have just beenÂ released with ourÂ latest major software release: Ranorex 6.0. You can find further information on the new code editor features in this blog post.Does Ranorex support automated testing of mobile applications?
Ranorex enables automated testing of mobile Android andÂ iOS applications. You can test hybrid, native and mobile web applications. TheÂ benefit? You can connect your mobile device to Ranorex Studio using either a USB or Wi-Fi connection. For more information on mobile test automation with Ranorex, please visit our dedicated Ranorex User Guide section.
At the end of this blog post, we just couldn’tÂ resist letting you in on this hilarious incident that occurred at the Test Automation Day this year. Unaware of what was about to happen, weâre busy talking to prospective clients at our Ranorex booth, when a woman came up to us and asked: âMay I touch your balls?â. We’ll leave it up to you to imagine the look on our faces!
Writing code is tricky enough. You shouldnât have to spend hours improving itsÂ readability or worry about unnecessary typos causing build errors. Ranorex 6.0 now makes a ton new code editor enhancements available, which will help you quicklyÂ write clean and easily maintainable test scripts. Here’re 7 of the most fantastic time-saving features:1. Code templates
We all love the custom code templates in Ranorex Studio. Using the tab key, you can now access multiple predefined templates, such as the for/for each loop. Icing on the cake for all usÂ coders!http://www.ranorex.com/blog/wp-content/uploads/2016/06/Code-Templates.mp4 2. Context specific actions
Improve your code structure with these amazing new context specific actions. Simply moveÂ newly created classes into specific files, or right click on the edit pencil to check for null or undefined variables. These are just a few examples – give it a try!http://www.ranorex.com/blog/wp-content/uploads/2016/06/Available-Actions.mp4 3. Refactoring
Wouldn’t it be great if you couldÂ replaceÂ complex code fragments with small, easily readable methods? The extract method enables you toÂ group your fragments to methods. You can further give them a clear name that explains their purpose.http://www.ranorex.com/blog/wp-content/uploads/2016/06/Refactor.mp4 4. CamelCase search functionality
Find what you’re looking for faster with the CamelCase search functionality!Â CamelCaseÂ identifies the segments of compound words and uses the capital letters to list potential search results.5. Auto insertion of using
Start saving time when using namespaces! TypeÂ in a class using the auto-complete functionality. Ranorex will then automatically add the specific using directive of the needed namespace.6. Introduction of new methods
And yet another feature that will save you time: When calling an unknown method in code, you can now easily implement it with the context specific action âintroduce methodâŠâ.7. Switch on enum
This little feature comes in quite handy and enables you to write code faster. When typing a “switch” statement where the condition is an enum the cases are automatically prefilled.http://www.ranorex.com/blog/wp-content/uploads/2016/06/Further-Small-Enhancements2.mp4
These and many more fantastic featuresÂ are available with Ranorex 6.0. Update your Ranorex Studio now (yes, itâs free!) and start coding!
Donât miss out on this fantastic offer: Only until June 30, 2016 you can save 30% on Ranorex Runtime Floating Licenses! This offer celebrates our much requested and long awaited featureÂ Ranorex Remote, which is available with our latest major software release Ranorex 6.0.
A Ranorex Runtime Floating License enables you to run tests on additional physical or virtual machines. Now, Ranorex Remote takes remote test execution a step further. Using this new feature, you can:
Remote test execution has never been this easy! All you need is a Ranorex Runtime Floating License to set up a Ranorex Agent and use Ranorex Remote. So donât just let this offer pass by, and order your Ranorex Runtime Floating License today!
You donât want your automated test to take longer than it has to. Fact is, the debugger directly affects the test execution time. Thatâs why in Ranorex 6.0 tests run without debugger by default in Ranorex Studio. Simply press the âRunâ button â no administrator privileges are required â and start saving time.
We know, only hard facts count. Thatâs why weâve conducted a comparison, running a test with and without debugger, so you can see the benefits of the new default setting for yourself.Up to twice as fast test run in Ranorex 6.0
Test environment and data
Weâve used the Ranorex KeePass sample, one of our sample test solutions delivered with Ranorex Studio, so you can easily reproduce these tests. All test cases were enabled. To omit static delays which could influence the test results, we further activated the Turbo Mode for all recording modules. We ran the tests in two setups. In the first, the computer was in an idle state. As in everyday work life, however, a machine usually has to juggle multiple processes, we simulated a 100% CPU load with a CPU Burn-in in the second setup.
The results clearly show that when your computer is in an idle state, the new default settings merely reduce the test execution time by 5%. However, when youâre using your computer to the full capacity, your test will be twice as fast now. These two scenarios represent two extremes, with a realistic CPU usage being somewhere in the middle. One way or another, one thing is clear: this new default setting will definitely save you time. Especially if youâre using an older system, youâll see significant improvements in execution time.When to use the debugger
Debugging is important. You just donât want the debugger to be part of your test execution by default, but use it legitimately, and only when it really does make sense. So when you do need it, you now simply have to press one button to enable the debug mode. Using the debugger, you can set breakpoints directly in the Ranorex code editor to intercept the test run at predefined positions. This allows you to look at specific steps more closely and perform manual interactions. An important note on the side: Please donât forget that previously set breakpoints will be ignored in the new default run mode.
Weâve conducted our tests using a virtual machine setup on a host machine with the following specifications:
Win7 64 Bit
Intel i5-3570 CPU @3.4 GHz (4 Cores)
16 GB RAM
Samsung EVO 840 SSD
Seagate ST3320620AS HDD
NVidia GT640 2GB
VirtualBox 5.0.16 (+ Extention Pack)
Win7 32bit VM â installed on HDD
1 CPU (ICH9; I/O APIC enabled; 100% Execution Cap; PAE/NX enabled; Paravirtualization: default; VT-x + nested paging enabled)
3072 MB RAM
Display: 128 MB memory; 2D + 3D acceleration enabled
AHCI SATA controlled using host I/O cache
The idea of automating tests is that you can optimize quality, speed and efficiency in testing. But what goodâs that, if you canât do any work during test execution instead, have to run one test after the other, and there is no fluid workflow when working in teams? Weâve taken test automation to the next level and offer a sublime feature that will save you time and supports a team approach: Ranorex Remote.How does Ranorex RemoteÂ work?
Directly out of Ranorex Studio, you can deploy your tests to Ranorex Agents to execute them remotely. Using a Ranorex Runtime Floating License, you can install a Ranorex Agent on a physical or virtual machine. You can set up multiple agents within a network and configure the test environment according to your needs. This enables you to simultaneously execute multiple tests in various different test environments, in the same time it took to execute a single test before. Your application has to work no matter which technology or operating system your customersÂ are using! Now you can test desktop, web or mobile applications using different operating systems, system configurations, browsers, etc. at the same time â there are no limitations. You can continue using your local machine during remote test execution. Once the test has been executed remotely, youâll get immediate feedback on the test performance. The report itself is stored on the Ranorex Agent the test has been executed on.
Just take agile testing, where immediate feedback and team collaboration are key success factors. Ranorex Remote now supports just that with a sublimely fluid workflow. Each team member can send tests to the same Ranorex Agents in a network and has full access to all information on these agents. As an agent can only execute one test at a time, the agent will queue the tests and execute them in order of arrival. Each team member can view the number of tests in the job queue of a specific agent, filter test reports according to test execution time and status, as well as delete or download reports directly from an agent. Thus, everyone in a team is equally informed about remote test execution. Just imagine a test run has failed, and you need immediate help or feedback from one of your colleagues: Simply pass on the information which agent the test has been executed on and when. Directly from the Remote Pad within Ranorex Studio, your colleague can now easily access the Run History of the Ranorex Agent, filter the report, download it locally and continue working with it. As each team member has full access to all remotely executed tests and their reports, it is easy to keep track of the testing progress.Limited offer!
Ranorex Runtime Floating License now 30% off!
Buy now! Valid until June 30,Â 2016
Think that sounds fantastic? This feature is part of Ranorex 6.0. And as always: all major software updates are included in our maintenance services at no additional costs. Stop wasting time, get a Runtime Floating License and check out our User Guide for detailed instructions on how to set up your Ranorex Agents today!
Many have requested it, itâs been truly long awaited and finally itâs here: the Ranorex Studio Git integration. Ranorex 6.0 gives you full access to all Git functionalities within Ranorex Studio. Git is the most commonly used open source version control system and plays a major role in many development environments. So far, Ranorex has only supported the centralized version control systems SVN and TFS. Ranorex now responds to the ever increasing demand for a distributed version control system.Benefits of the Ranorex Git integration
With the release date looming around the corner, itâs always a race of developing and testing new features. If youâre already using Git, you shouldnât have to invest much needed time and resources to set up an additional version control system. You can now version control your Ranorex projects with Git. Directly from Ranorex Studio, you can commit and push changes to the repository as well as pull them from there. For those of you using Git in the development environment, this update thus not only save you time, but also enhances collaboration between development and testing teams.
This update gives you full access to all Git functionalities within Ranorex Studio, including:
This and more features are available with Ranorex 6.0. And in case you forgot: This major software update is already included in Ranorex software maintenance at no additional costs or hidden fees.Â Update to Ranorex 6.0 now, check out our Git User Guide section and get started! All there is left for us to say is: Enjoy and have fun testing!
A major software update with a ton new features led to a great Q&A session in our Ranorex 6.0 Webinar! It was a pleasure presenting the new Ranorex 6.0Â featuresÂ to all of you, and I’ve received some excellent questions. As I didn’t get to all of them in the webinar, I’ll cover the most popular questions here.Â But before I continue, Iâd like to take this opportunity to thank all 640 attendees for their valuable input â you truly made this webinar a success!Updating to Ranorex 6.0
How much does it cost to update to Ranorex 6.0?
All major software updates, and thus also Ranorex 6.0, are included in our maintenance services at no additional costs. If your maintenance services have expired (have to be renewed annually), please visit our Renewal page or contact us for further information.
Can I install and use both Ranorex 5.4 and Ranorex 6.0?
You can only install and use one Ranorex version at a time. As Ranorex will create an automatic backup of your entire solution when updating to Ranorex 6.0, you donât have to worry about the possibility of your projects being corrupted.
What license do I need to set up a Ranorex Agent and use a Ranorex Remote?
You need a Ranorex Runtime Floating License to set up a Ranorex Agent and use Ranorex Remote. Remember that only until June 30, 2016 you can save 30% on Ranorex Runtime Floating Licenses, so be quick! The agent takes the license at startup and keeps it until the agent is shut down. Thus, a Runtime License is blocked as long as the Ranorex Agent is active.
How do I deploy settings to a Ranorex Agent?
Settings from your local machine can easily be deployed to a Ranorex Agent. Please consult our dedicated User Guide section for detailed information on how to do so.
Do I need an active user session to run a remote test?
Yes, you need to make sure the Ranorex Agent is running in an active user session. Find outÂ how to keep your remote machine unlocked even if you close the RDP sessionÂ in our dedicated User Guide section.
How can I start a remote test?
You can start a remote test directly out of Ranorex Studio using the Remote Pad. By pressing the âRunâ button next to an agentâs name, the currently selected Run Configuration will be executed on this agent. Please find further information in our User Guide.
Can I send tests to an “Agent Pool”?
You have to specifically selectÂ theÂ Ranorex Agent you want to execute your test on.
Which tests can I run on Ranorex Agents?
You can only run test suites on Ranorex Agents. If you want to find out more about how to execute remote tests with Ranorex Remote, you can find detailed instructionsÂ here.
Can I debug remote tests?
Debugging is only possible for locally executed tests. As Ranorex Remote only enables remote test execution, debugging is not possible at the moment.
Can I continue working on my local machine during remote test execution?
Yes, this is a main purpose of Ranorex Remote. Your local machine is not blocked during remote test execution.
Are remote tests executed sequentially or in parallel?
A Ranorex Agent can only execute one test at a time. If multiple tests are sent to one Ranorex Agent for remote test execution, these tests will be queued at the agent and executed in order of arrival. If you want to execute multiple tests in parallel to each other, you need to send each test to a different Ranorex Agent. As an example: If you want to execute three tests at the same time, you have to send these tests to three different Ranorex Agents, which require a total of three Ranorex Runtime Floating Licenses. You can find further information on remote test execution in our dedicated User Guide section.
Can I integrate Ranorex Agents into a CI system? Can I schedule tests with Ranorex Remote?
At the moment, you can only start remote testsÂ from Ranorex Studio and scheduling is not possible. Please check out our Product Roadmap to find whatâs planned for Ranorex in the near future.
Can I create custom code templates in Ranorex Studio?
Yes. In Ranorex Studio, simply select Tools > Options > Code Templates. Type yourÂ custom code template in the last row of the table and confirm by pressing âOKâ.
Which programming languages are supported in the Ranorex Code Editor?
The Ranorex Code Editor supports VB.NET and C#. Ranorex 6.0 is not based on the latest version of Sharp Develop, as otherwise VB.Net would not have been supported anymore.
Can I auto-create variables?
Yes, you can not only auto-create variables in Ranorex Studio, but also auto-create parameters. You can find instructions on how to auto-create variables in our dedicated User Guide section here, and on how to auto-create parameters here.
Why is Ranorex the ideal tool for testers and developers? What is the Ranorex API? How can agile teams benefit from Ranorex? Questions you may have already asked yourself and the renowned test automation architect, avid blogger and podcaster, Joe Colantonio has now discussed with our Ranorex Head of Sales, Christoph Preschern, and Product Manager, Roland Enzinger.
In Joe’s podcast, they talk about topics such as:
We didn’t want to give it all away, so here are just a few questions Joe has asked our test automation experts:
Do you have any examples of where your customers are currently using Ranorex?
Many of our customers are using different types of technologies. One of our key USPs is the broad support of different technologies. Think about .NET based applications, Java based applications, ERP Systems like SAP, Oracle Forms, or mobile applications. On mobile devices you might have hybrid, native and mobile web applications. Ranorex allows you to combine all technologies within one test. Many of our customers are doing end-to-end test automation. Just take an online bookstore as an example. Using Ranorex, you can simulate adding a book to an ERP system, then simulate a user looking for a book on a mobile device, adding it to the wish list and, in the next step, accessing the wish list as well as purchasing the book from the webpage using a computer. Finally, at the end of the loop, you can verify whether the book has been correctly removed from the ERP system. Scenarios like these can easily be created in one test case with Ranorex.
Does Ranorex integrate with any version control system?
Ranorex Studio directly integrates with Git, Subversion and Team Foundation Server. You can easily use any other file based version control system outside of Ranorex Studio, as the entire Ranorex project structure is file based.
Do you only support UI based technologies or also any type of API REST testing?
Besides the UI, thereâs an increasing demand for web service test automation, and itâs always worth to combine UI tests with API tests. This is possible within Ranorex Studio, as you can create your web service tests based on existing libraries from the .NET framework.
How should a team get started with test automation?
Itâs important to know which test cases should be automated first. Thatâs why itâs essential to have an understanding of testing in general. You shouldnât just automate any test case. You need to consider which test cases are executed the most, as the return on investment is linked to the number of times a test is executed. When introducing a team to test automation, you need to think about who is doing the automation and which test cases to automate. At Ranorex we offer free online webinars, videos and written instructions to inform people on how to get started with test automation, provide useful tips and best practices. For those who have mastered the test automation basics and want to proof their knowledge, we also offer a Ranorex Certificate.
Thereâs a brand new major software update available! Ranorex 6.0 has finally been released! Incredible new features are waiting for you: Ranorex Remote for remote testing, Git integration, faster test execution, code editor enhancements, and many more.
Join 6.0 WebinarDownload 6.0 Trial
Weâre so excited about the new features and canât wait for you to try them out. As you do need a Ranorex Runtime Floating License to set up and use Ranorex Remote for remote test execution, we have a special surprise for you: Only now you can get 30% off Runtime Floating Licenses. Itâs a time limited offer, so buy now and start saving time withÂ Ranorex Remote.Limited offer!
Ranorex Runtime Floating License now 30% off!
Buy now! Valid until June 30,Â 2016
If youâre testing a web application, it would naturally be best to test it with not only one but with all of the most popular browsers (cross-browser testing).
This blog post will show you how to record your automated website browser tests and then automatically execute the recorded tests on different browser for browser compatibility testing. Ranorex is a cross browser testing tool which can run tests in Microsoft Internet Explorer, Mozilla Firefox, Google Chrome, Chromium and Microsoft Edge.
To demonstrate how to perform a multiple browser test, we will generate a small sample which enters data in our VIP Database Test Web Application
First of all weâll create a Test Case holding two Recordings, one for opening and one for closing the browser as setup and teardown modules.
Now we add a âOpenBrowserâ action to the OpenBrowser Module with âhttp://www.ranorex.com/web-testing-examples/vip/â as Url and e.g. âIEâ as browser.
As next step we add a recording module validating the status String on connecting and disconnecting.
The recording module simply
Make sure to have two repository items representing the connection status text, one for âOnlineâ and one for âOfflineâ. This allows you to overcome issues with delaying validation steps. In our application it takes some time that the status text changes from âconnectingâŠâ to âOnlineâ. To make the Validation work, we can simply add the actual validation into the RanoreXPath and only validate the existence of the status text in our web page. By doing so, we are using the search timeout of the repository item to wait for the status text to change.
Additionally to the TestConnection recording, we will generate a recording for adding VIPâs to the database. This recording will be added to a new Test Case as we want to data driven add VIPâs and do not want to open and close the browser and testing the connection with each iteration of adding a new VIP.
The recording might look something like this:
As we want to make our test data driven, we have to add variables which can be bound with the data from our data source.
The key sequences for first and last name contain the variables $FirstName and $LastName.Â To select the category, we have to add a SetValue action and set the TagValue to the variable $Category.Â The gender can be set by adding a variable to the RanoreXPath of the corresponding repository item.Â Additionally, we validate the VIP count against a variable $VIP_Count.
After generating the recording, we create a data source for the Test Case Add_VIPâs and bind the data tables to the variables of the recording AddVIP.
As last step we add a Close Application action to the CloseBrowser Module with the application folder of the web application as repository item.
Now we can execute our Test Suite Project, which:
Therefore open the recording âOpenBrowserâ and edit the browser which should be started. Now choose âAs new VariableâŠâ instead of âIEâ and add a new Variable called BrowserName.
After that, add a new simple data table to the Test Case âAdd_VIP_and_Validateâ, holding the names of the different browsers and bind the data connector to the variable âBrowserNameâ.
After making the browser variable that way and binding this variable to a table holding all supported browser names, you can execute your test script for all supported browser.