Source control with GitIf you are using Git as your source control provider, you can use Ranorex Webtestit to track changes and compare file revisions. A source control system serves as a log of all changes that occurred to your project’s files. As your software advances so do your tests and therefore it comes in handy to have multiple versions of your automated tests available. We highly recommend putting your test project under source control, especially when you are working in a team. If you are not experienced with Git, you can find a tutorial at the official Git website.
Structure of this chapter
Automatic tracking of your Git repositoryRanorex Webtestit integrates seamlessly with Git and enables you to track changes and compare revisions of your files.
To activate the Git integration in Ranorex Webtestit, just add your project to a Git repository.
When opening a project tracked by Git in Ranorex Webestit, all the changes you make are automatically monitored for you. In the Project tab, the root folder of your project will change to show you the active Git integration.
Changed files are highlighted in yellow. Added files are displayed with a green text.
If an element can’t be located, it does not automatically have to result in a failed test. However, for reliable test execution, it is crucial to have robust selectors for your elements.
You can compare changes in individual project files. In the following sections we’ll show you how.
Commit history and revision comparisonYou can view the commit history on individual files by opening them in the editor. In the top-right corner, click the Open commit history button
Alternately you can also right-click the file in the Project tab and select Compare to from the context menu.
You can see the changes that have been made to the current file in the current branch. If you want to compare your local revision with one in the past, click the corresponding commit and select Compare with selected. The file will be displayed in the comparison view.
View changes in local revisionYou can use the Ranorex Webtestit editor to compare different versions of a file. If you want to view the changes you made in your local revision, click the Open changes button in the top-right corner
Alternately you can also right-click the file in the Project tab and select Show changes from the context menu.