Building Test automation framework with .NET Core 2.0 for Android/iOS/Web in MacOS and Windows 10

Building Test automation framework with .NET Core 2.0 for Android/iOS/Web in MacOS and Windows 10

At first instance after reading the articles fancy heading you may think we are going to build an automation testing framework with .NET Core 2.0, if so then its absolutely not. We are going to discuss about the current possibilities of building automation testing framework for different ecosystems like Windows and MacOS using latest Microsoft's offerings which is .NET Core 2.0, Using .NET Core we can build test with C# for application running in

  • Android
  • iOS
  • Cross browsers like (firefox/Chrome/IE/Safari/Edge)

Possibilities before .NET Core (Bill gates - Steve ballmar's era)

Code written in C# using Visual Studio (before .NET Core) with .NET framework 4.7.1 can run only in one single operating system which is Windows and ONLY Windows OS. So, any code you write is only for Steve ballmars & Co meaning it was restricted, not open sourced, hated JAVA and other languages :)

Introduction to .NET Core (Satya Nadella era)

.NET Core opened up an whole new possibilities for Microsoft, code written with .NET Core runs on Windows/MacOS/Linux. Even though Microsoft did it very late envying JAVA long time, they are doing it fairly good, since they know C# is more powerful and popular than many programming languages and pretty close to Java as shown here in TIBOE index

Another good news is .NET is now open source and you can contribute to C# your own from here https://github.com/dotnet

Test Automation with C#

Now lets talk about Test automation with C# a little bit, the most popular automation testing API currently available in market is with no doubt Selenium, if you don't know Selenium, you can learn it from here and I have discussed it lot more than anything else.

Selenium is used to automate any web application dot. It has C# language bindings as well and currently Selenium 3.6.0 supports .NET Standard 2.0 meaning .NET Core 2.0 is supported out-of-box.

How about mobile automation ?

If that's your questions, Appium is the most popular tool for Android and iOS application automation which I have discussed as well and it has C# language binding but it runs on Windows OS ONLY (for now), since its not fully compatible to run on MacOS as it has no support for .NET Standard 2.0 yet, but in very near future we may see its support as well.

Now you can think Java is much better, since it works with MacOS and Windows for pretty long time ago, but again, wait.

Xamarin is yet another popular tool which is currently used by more than 1.4 million developers across the globe is gaining more popular than even Java as shown in TIBOE index here

How about automation testing with Xamarin then ?

If that's you next questions, then you asked it right !

Xamarin has something called Xamarin.UITest which runs on MacOS and Windows OS to test both Android and iOS with same code. Application with Xamarin can be developed using Visual Studio for Mac 2017 and it runs most of the project templates for VS 2017 which runs on Windows.

I have already talked about Xamarin.UITest a lot in this course and I have also built an complete framework which not only talks about Xamarin.UITest, but also running the test in BDD styled fashion on both MacOS and Windows OS for Android and iOS.

Test Automation framework with .NET Core 2.0

Well, now I guess you know what I will talk next, test automation framework right ?

Well, yes !

I have already talked a lot about building an test automation framework with C# for Selenium, but that's just for different browser on Windows OS, the idea now I would like to showcase you is this framework

As you can see in the framework above, the same code will enable you to run test on two different ecosystems like MacOS and Windows, since .NET Core 2.0 works on these ecosystems and can execute test to run on

  • Android
  • iOS
  • Web
  • Web service and Web apps
  • Performance testing of Web and Web services

In both on-prem and cloud. You can use Xamarin Test Cloud to deploy your application and run test in few seconds.

Conclusion

As said in the beginning of this article, I have not written any code here for developing this framework, but I am already working on this great above framework and its really working fine in MacOS and Windows for Android/iOS/Web.

Resouces

Yuriy Matviienko

Senior Automation Engineer | Java, C#, API Automation, UI Automation

5 年

Did it work with .net Core 3.0?

回复
Craig Pichanick

Chief Information Officer at Triad Financial Services, Inc

7 年

So thrilled with our Medical Tracking Solutions QA team driving the art of possible with our new automation strategy, helping to deliver best in class products for our customers.

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

Karthik K.K的更多文章

  • End to End Automation testing with Cypress

    End to End Automation testing with Cypress

    Most end-to-end testing tools are Selenium-based, which is why they all share the same problems. To make Cypress…

    1 条评论
  • The era of Non-Selenium automation testing tools 2019

    The era of Non-Selenium automation testing tools 2019

    Selenium was developed as an internal tool in 2004 at ThoughtWorks and later it made publicly available as Selenium…

    13 条评论
  • Software testing trend 2019

    Software testing trend 2019

    In this post, we will discuss Software testing trends of 2019 in much high level, as most of the trends that we will…

  • Automated Integration Testing and Why?

    Automated Integration Testing and Why?

    In this post we are going to discuss about automated integration testing. So far in ExecuteAutomation.

    9 条评论

社区洞察

其他会员也浏览了