Search code examples
seleniumselenium-webdriverautomated-testsfunctional-testing

Looking for a open source web testing automation framework


Guys I am looking for Web Testing Generic Automation Framework which can be used to do automation testing of various web based applications .Looking for C# based framework as that is the language I am more familiar with. But any other language framework will also do and it should not use any proprietary/licensed language. Framework should have some open source and free of cost license model.

I searched for selenium based framework on Google and SO. But could not come with any which have source code available. It will be good if the framework encapsulates all the functionality provided by Selenium WebDriver and/or Selenium RC and empower the functional tester to create and maintain test in human readable scripts.

Requirements of the framework:

The framework code should avoid hard coding of test steps. My idea is to maintain the test scripts outside the automation framework code , so that they can be easily be modified if needed. The framework should read through the step tables and the data tables and run the test accordingly.

If there is no such framework available now right then we can collectively build such a framework in a open source community model.

P.S. I have read a little about Hermes Framework and Robot Framework, but not yet tried them, any help is welcome.


Solution

  • The good side of this problem: there are a lot of flexible tools and approaches, you can get together and build a flexible, reliable and robust test automation framework.
    The hard part is: yes, there is no “out of box” solution, and you’ll need to find and put together lots of tools in order to solve this test automation puzzle.
    What I would recommend:

    1. First you need to choose a unit-test test framework. This is a tool which helps to identify separate methods in code as tests, so you can run them together or separately and get the run results, such as pass or fail.
      My personal opinion, is that the testing tool – MS-Test – which ships with Visual Studio 2013 (and also Express Edition) is good enough. Another alternatives are: NUnit or Gallio Icarus

    2. All unit-testing frameworks includes a mechanism for doing assertions inside the test. The capability of assertions class depends on given unit-testing framework. Here, I would like to recommend a popular library which works great for the entire unit testing framework.
      This is Fluent Assertions (also available from NuGet repository).

    3. That’s a hard moment. You need to decide: are you going to use the PageObject approach in order to build your test automation framework, or you are going to choose simpler approach, without heavy utilization of the Object Oriented Programming.
      Properly designed Page Objects makes your test automation code much maintainable. Utilizing the OOP – you can do a magic in your code: write less to do more. Although, such approach requires more skill.
      Here are a good articles on this topic:
      Maintainable Automated UI Tests
      And this one:
      Tips to Avoid Brittle UI Tests

    4. The alternative to the PageObject is a scripted approach. This approach can be also successful and requires less time to start.
      Coypu is a good and usable example of such framework for Selenium Web Driver.

    5. All the popular unit-testing frameworks support data-driven tests. The best support is in NUnit – you can run/re-run and see the tests generated for individual data row in the tests tree. MS-Test supports reading data from different data-sources: text files, excel, mssql etc., but it is not possible to re-run the test for individual data row. Although, there is a hack for this – Ms-Test Rows.
      For my data-driven tests, I am using a great library – Linq to Excel
      I have a lot more to say. There are so many approaches to build test automation framework – and there is no ready solution yet.

    I am trying to build one according to my testing methodology – SWD.Starter . This project is still on its early development stages. But, at least, probably you’ll find a few tips how to build and organize the test automation code.