logo logo

Switching to Web Test Automation and Selenium Starts with TestProject!

main post image

In this article (which is part of our TestProject webinar which was hosted on Nov. 5th 2019) we are going to discuss how anyone who is interested in web automation testing and has little or no knowledge in Selenium can switch to TestProject with Zero effort!

In the webinar itself we’ve discussed the steps to getting started with web test automation with Selenium and TestProject, without any coding skills required! Here you can watch the full recording of the webinar:

Problem Statement

Over the past years, more and more manual testers are looking to transition into the growing test automation field, but they don’t always know where to start from and they don’t always have the necessary coding skills.

šŸ’„ In this webinar we’ve discussed the following šŸ’„

  1. The problem we might face when getting started with test automation.
  2. The solution to getting a soft land with Selenium commands and test automation, even if you do not have any coding skills (using TestProject Free Platform).
  3. Tips and tricks to create your first web test, upgrade your tests with code and get fancy reports!
  4. Q&As on anything related to manual testing, test automation, Selenium and TestProject.

TestProject Test Automation Webinar

TestProject Test Automation Webinar

TestProject Test Automation Webinar

TestProject Test Automation Webinar

Solution

We are going discuss how TestProject can leverage and simplify your Selenium coding experience in an much unified fashion. The complete detail are available in the webinar video below:

Here we will discuss some of the coding parts discussed in the webinar video such as:

  1. Automatically generating coded tests and editing the tests locally.
  2. Adding NUnit Tests to run them in different browsers.

Automatically generating coded tests from TestProject and editing the tests locally

The recorded test that was exported to C# code from TestProject platform looks like the one below, with runner and actual test code:

Runner

The runner is the code which is responsible for running the actual test code and the runner codes are those which are useful for running the test in your local machine.Ā The runner has the following most important piece of code:

  • DevToken
  • StepExecutionResult
  • RunnerFactory

As shown below in the screenshot:

TestProject Test Automation Webinar

Test Code

Test code is the actual code which tests the application that we are intended to as shown below:

TestProject Test Automation Webinar

The complete code development discussion is available in even more detail here.

Adding NUnit Tests to run them in different browsers

Here is the way we can use NUnit [TestFixture] attribute to run the test in different browsers and validate that it works as expected on all browsers. Once uploading your code back to TestProject platform, there is no need to include the NUnit library, since with TestProject’s UI and API you can easily trigger your test automation on any browser you have installed on your machine.

[TestFixture(AutomatedBrowserType.Edge)]
[TestFixture(AutomatedBrowserType.Chrome)]
[TestFixture(AutomatedBrowserType.Firefox)]
public class TestRunner
{

    public static string DevToken = "<DevToken>";

    Runner runner;

    public TestRunner(AutomatedBrowserType automatedBrowserType)
    {
        runner = RunnerFactory.Instance.CreateWeb(DevToken, automatedBrowserType);

    }


    [Test]
    public void RunTest()
    {
        runner.Run(new EATest(), true);
    }
}

Summary

We have discussed even more details in this webinar beyond whats there is here in this article. Please feel free to watch it out and let me know what you think in the comments below.

Avatar

About the author

Karthik KK

I am Karthik K.K. I do consulting, blogging and researching on various different tools and technologies which inspires my interest. I have been into Software Automation Testing for overĀ 12Ā yearsĀ now and my interest in learning new stuffs which enables automation has never been compromised.

Due to my passion in automation testing I got fully exposed to tools and languages like

Desktop & WebĀ : QTP, Selenium, Specflow, VS Coded UI, Ranorex ,Test Complete and Cucumber
MobileĀ : Appium, Robotium,Calabash, Espresso, Selendroid
LanguagesĀ : C#, Java, Ruby, Powershell, Javascript, VBScript
Cloud ToolsĀ : Azure, Dockers
Misc Tools:Ā Mockito, Rest-assured, Bound-Box,FluentAutomation
Interested in: MVC, Entity framework, LINQ, Fakes, Distributed deployment, SAAS

Follow on YouTube – https://youtube.com/executeautomation
Follow on Twitter – https://twitter.com/executeauto
Follow on linkedIn – https://www.linkedin.com/company/executeautomation/
Follow on Facebook – https://www.facebook.com/executeautomation/

 

Join TestProject Community

Get full access to the world's first cloud-based, open source friendly testing community. Enjoy TestProject's end-to-end test automation Platform, Forum, Blog and Docs - All for FREE.

Join Us Now  

Leave a Reply

Join TestProject Newsletter

Join a 20K community of readers! Always stay up-to-date with all the latest test automation trends, best practice and tips shared by leading software testing community experts across the globe!

FacebookLinkedInTwitterEmail