Tag Archives: system

My series of Maven related articles is out now

If you haven’t seen, this week i released my series of 2 articles to help get you started with Maven. In the first one, i discuss how to setup Maven on your machine and how to create a brand new Maven project. I also explain key concepts that define what Maven and a Maven project are (like dependencies). Check out this article here: https://blog.testproject.io/2021/06/28/getting-started-with-maven-part-1/.

In the second installment in this series, i further discuss some specifics about dependencies. Then, i go over project goals, how you can run your tests, and how you can create profiles and use system properties in your test run. Check it out here: https://blog.testproject.io/2021/06/28/getting-started-with-maven-part-2/. Enjoy.

Browser unaware Selenium tests. STEP 3: Starting a browser based on a system property

By now, following the previous two posts in this series, you have setup the methods that initialize a Chrome and a Firefox browser. In this post, you will see how to use System properties for easily switching the browser in tests. Continue reading Browser unaware Selenium tests. STEP 3: Starting a browser based on a system property

Identify the OS tests are running on with os.Name or SystemUtils

In order to make your tests OS agnostic, sometimes, you need to create some additional logic to handle OS specifics. For example, if you are running Selenium tests, on a browser, you want the test to run on all OSs, not just one, and start the browser instance corresponding to the OS the tests run on.

For that, you need to first identify what OS the tests run on. That can be done either by creating your own OS detection code, using the os.name system property, or by importing an existing class that does the work for you, named SystemUtils.   Continue reading Identify the OS tests are running on with os.Name or SystemUtils