FundamentalsThis chapter will introduce you to some common terms and definitions you will need when testing websites and apps. If you want to start working with Ranorex Webtestit right away, you can skip this chapter and start to ⇢ create your first test. Structure of this chapter
Why test automation?You might be familiar with the typical software development process: Developers write code based on a specification of some sort and as a tester, it’s your job to verify it works as intended. Usually, you will start this by composing test cases, which describe your website’s or app’s expected behavior.
Among other purposes, test cases serve as documentation on how an app’s functionality was verified. They can be used by others in your organization to test the software in the same way as you initially defined it.
Back in the days of classic software development, testing meant that at a certain point you would have to take all your test cases and verify them against your website or application. Nowadays we work in agile processes, which focus on faster releases and shorter iterations, which means you must adapt and verify your test cases more often. Along with this some serious problems arise:
- Your work becomes more monotonous because you have to verify the same test cases over and over again
- There’s a higher potential for missing out on something due to routine
- As software grows more complex and the number of test cases rises it becomes hard to deliver results on time
- In large projects, often only modified parts of the software are tested, although it’s hard to assess the dependencies of components under the hood. This contributes to a risk of leaving growing technical debts undiscovered.
What is Ranorex Webtestit?Ranorex Webtestit is a lightweight editor and toolset optimized for creating and executing UI tests for websites and web apps. Tests written in Ranorex Webtestit are apps that control your browser and therefore simulate a user on your website or app.
With the help of automated tests, you can save a lot of time and don’t have to manually repeat your test cases over and over again. Ranorex Webtestit helps you to set up your environment for executing those tests, manages ⇢ Page Objects for you and provides you with a powerful editor to script the actual test cases.
Automation frameworks and languagesTo compose machine- and human-readable test cases you need to utilize application programming interfaces (APIs) that ensure a proper translation of the steps to the test program. You can use different automation frameworks and programming languages to write your tests. Ranorex Webtestit supports Selenium and Protractor as frameworks for test automation.
Ranorex Webtestit sets up your environment and gets you going for directly starting test development. You don’t need to worry about configuring or setting up your machine first.
In order to create tests and Page Objects in Ranorex Webtestit, you’ll need knowledge in one of the supported programming languages. You can choose between Java and TypeScript for the language. You can find tutorials for Java at Oracle Docs. If you’re interested in learning TypeScript, you can check out their Quick start guide.
Selectors and page objectsYour website or app consists of a set of HTML components, which are rendered on screen by the browser. The user interacts with those elements by clicking on them, entering values through the keyboard, and so forth.
Thanks to web design efforts and decades of computer usage it is easy for humans to identify various elements within a website or app. We trained ourselves over time how to interact with input elements and where to locate them even with changing designs.
In order to interact with those same elements in your tests, you need to tell the automation framework how to identify and access them properly. You do this by referring to them through Selectors. With information provided by a selector, the automation framework locates elements in your website’s or app’s UI structure. Ranorex Webtestit comes with powerful tools to organize your selectors into Page Objects and manage them. You can learn more about Page Objects in ⇢ chapter 3 of this guide.
Things you’ll need to write testsYou will need some basic programming knowledge in the supported languages. We suggest following some online tutorials in case you’re not familiar with them:
- If you want to learn TypeScript, you can find a tutorial at the official website
- If you are interested in learning Java you can follow the Java tutorial