Selenium Test Automation
Selenium Test Automation Tool

Selenium Test Automation

Selenium is a software robot sent from the future to help us test web applications. But keep in mind that it's not one of those fancy shape-shifting robots than can run really fast. It's more like one of those really strong robots that's not very fast and is best suited for accomplishing a certain objective.

That is to say, Selenium is really good at a specific set of things. If you know what those are and stick to them then you can easily write reliable, scalable, and maintainable tests that you and your team can trust.

What Selenium Is and Is Not Good At

#Selenium is built to automate browsers, specifically human interaction with them. Things like navigating to pages, clicking on elements, typing text into input fields, etc.

It's less ideal for checking lower-level functionality like HTTP status codes or HTTP headers. While you can use Selenium this way, it requires additional setup of a third-party tool (e.g., BrowserMob Proxy), and it is a slippery slope since there are numerous edge cases to consider at this level.

Selenium Highlights

Selenium works on every major browser, with a number of major programming languages, and on every major operating system. Each language binding and browser is actively being developed to stay current. Yes, even Internet Explorer (thanks to Jim Evans and support from Microsoft!).

Selenium can be run on your local computer, on a server (with Selenium Remote), on your own set of servers (with Selenium Grid), or on a third-party cloud provider (like Sauce Labs). As your test suite grows, your test runs will take longer to complete. To speed them up you will want to run them in parallel, which is where the benefit of having your own servers or using a cloud provider comes in -- that, and the ability to have numerous browser and operating system combinations to run your tests on.

One of the guiding philosophies of Selenium is to be able to write your tests once and run them across multiple browsers. While this is a rosy proposition, it's not entirely accurate. There are plenty of gotchas to watch out for when you get into it.

Picking A Language

In order to work well with Selenium, you need to choose a programming language to write your acceptance tests in. Conventional wisdom will tell you to choose the same language that the application is written in. That way if you get stuck you can ask the developers on your team for help. But if you're not proficient in this language (or new to development), then your progress will be slow and you'll likely end up asking for more developer help than they have time for --hindering your automation efforts and setting you up for failure.

A great way to determine which language to go with is to answer one simple question: Who will own the automated tests? The answer to this and the discussion that unfolds from it will help you more effectively choose a programming language.

Open Source Selenium Frameworks

You can find a list of open-source Selenium WebDriver frameworks and their respective languages:

Outro

Choosing a programming language for automated testing is not a decision that should be taken lightly. If you're just starting out (or looking to port your tests) then considering and discussing these things will help position you for long term success.

With all that being said, the rest of this book will show you how to build your own test harness (in addition to writing well-factored tests) in Java with JUnit.





Dileep Kumar

Team Lead At HCL

5 年

informative article

回复

要查看或添加评论,请登录

Mallinath Mulage的更多文章

  • Unlocking Successful Trading Strategies with The Safe Trader Academy, Hyderabad

    Unlocking Successful Trading Strategies with The Safe Trader Academy, Hyderabad

    In the dynamic world of trading, having a structured approach is crucial for success. The Safe Trader Academy pyramid…

    2 条评论
  • Investing in the "Stock Marketing"

    Investing in the "Stock Marketing"

    We are glad to announce that our new batch is starting soon, interested people can enroll today. Learn about the stock…

    3 条评论
  • "Time to Time Update & Upgrade"

    "Time to Time Update & Upgrade"

    In 1998, there were 1,70,000 employees working in Kodak and they used to sell 85% of the world's photo paper. In a few…

  • From Old Way to New Way (Agile Testing)

    From Old Way to New Way (Agile Testing)

    Before Agile Methodology, what used to happen in traditional software development. In phase based approach in which…

    2 条评论
  • How to crack the Software Testing interviews?

    How to crack the Software Testing interviews?

    "How to crack the Software Testing interviews?" These days I have been interviewing many candidates for my testing…

    5 条评论

社区洞察

其他会员也浏览了