Saturday, June 22, 2019

WinApp Driver vs Coded UI - Windows Test Automation Tools Comparison

Serial
Coded UI
WinAppDriver
1
Coded UI is a Closed source project
Windows Application Driver is a partially Open source project
2
Coded UI is Not hosted on GitHub
WinAppDriver has a repository on GitHub
3
Coded UI is very expensive, it has a hefty license fee, licensed product
[Appium based] WinAppDriver is free software, there's no licensing fee at all
4
Microsoft Coded UI does not follow an industry standard
WinAppDriver is based on WebDriver industry standard(https://www.w3.org/TR/webdriver/)
5
Coded UI is Based on Microsoft’s closed source technologies
WinAppDriver is Based on Appium, WebDriver, and Selenium industry standard open source technologies.
6
Limited to only Microsoft’s chosen programming languages
WinAppDriver Can be extended to support any programming language(C#, Python, Java, C++, you name it). Many APIs already available. If you learn it with one programming language, you can easily take the same cocepts to another language.
7
Coded UI uses a proprietary protocol for communicating with the machines running automation. Remote machines are not supported.
Being based on Appium, WinAppDriver uses JSON wire protocol for communication between an instance of WinAppDriver and test automation scripts. You can also create a grid if need be.
8
Knowing CodedUI won’t land you many jobs in future
Knowing Appium based WinAppDriver makes you suitable for Selenium & Appium mobile automation job. You can switch over to mobile testing with little effort.
9
Supports older versions of Windows OS i.e. Windows 7
Does not support older versions of Windows(works on Windows 10, Windows Server 2016 and above)
10
Almost dead community, not much going on with Coded UI
The community of WinAppDriver is very active online on GitHub.
11
Deprecated, no further enhancements in Coded UI
WinAppDriver is actively in development, continuously improving. Microsoft is pouring resources into it.
12
Coded UI script (C#, VB.Net) runs on a machine directly
A script based on WinAppDriver can control multiple machines using driver instances without even going to the machines under control.
What was CodedUI: CodedUI was a licensed software test automation technology by Microsoft. It was discontinued in 2019.
What is WinAppDriver: WinAppDriver is a free Windows application automation API. It is based on the open-source automation technology Appium. WinAppDriver itself is not open-source.




I've launched a course about Automated UI Testing using WinAppDriver with C# .Net; here's a link:

https://www.udemy.com/course/appium-winappdriver-automation-testing/?referralCode=ED22C3A4CE5BB5E22E53

Azure DevOps Build Pipelines: Run Windows UI Automation & CI


This course is a beginner's tutorial about software test automation. It is also a WinAppDriver tutorial and a learning resource. Coded UI is deprecated, and WinAppDriver is the way to go forward.
You're wrong if you think WinAppDriver is only suitable for Windows 10 and want to stay on Windows 7. The support for Microsoft Windows 7 is has ended in 2020.

FYI, the list of essential differences between Coded UI and WinAppDriver(Windows Application Driver) is given above.

Additionally, one Coded UI test could run on one machine only. But a single WinAppDriver script can automate more than one machine. This is very helpful for client-server testing applications.

Appium WinAppDriver Console Window Showing JSON Commands
Appium WinAppDriver Console Window Showing JSON Commands

Please note that my course serves as an excellent WinAppDriver tutorial. You can use it to learn WinAppDriver Windows Desktop automation and use the same concepts with Java or Python languages too.

Almost nobody is focusing on desktop automation and testing because everybody thinks the desktop is dead. But, desktop systems are still the mainstay of many enterprise systems. One such example is ResWare Desktop.
How to test ResWare Desktop?
Automated testing of ResWare is possible using the WinAppDriver. Please see the link to the best WinAppDriver tutorial.



Monday, May 20, 2019

Online Course Introduction: TCP/IP Socket Programming in C#.Net For Coders & Students


Learn socket programming in C# .Net
Big discount coupon link
https://www.udemy.com/tcpip-socket-programming-for-coders-using-csharp-net/?couponCode=HALF
Get proficient in computer network socket programming using TCP/IP streaming sockets and become a better professional programmer.



An important concept of socket programming & network communication is covered in every video lecture. Concise C# code examples are supplied in Visual Studio solution form, and a demo after every couple of lectures will show you practical implementation of the concepts described earlier. 
          By the end of this course, you will be able to create CSharp .Net software capable of sending and receiving data over TCP/IP sockets on peer to peer basis with async and await keywords. You will learn not only socket programming, but async/await keywords as well. The course will make you a better programmer.

Why take this course? 
You should take this course if you're a professional(or student) with some coding experience in the past but lack understanding of how computer networks work on a software level(either in C#, Java, or C++). 
You will learn techniques which are useful in real life scenarios commonly faced by programmers. 
Many students of distributed application programming university courses have taken this course in the past and posted positive comments in reviews. They were able to easily complete their assignments on their own after watching this course.                        
Section 1 is available for free, it contains very useful information anybody can benefit from, whether they're familiar with C#.Net or not. 




Minimum upfront theory 
A lot of courses tend to pile up theory ahead of the real code, this course is going take a minimum theory first approach. 
You will learn essentials of network programming and start writing C# code in under 15 minutes. 

Use of Windows Forms and class library
This course will use a class library project in C# along with Win Forms, an approach different from many other courses who use command line projects. My teaching methodology makes the course lot less boring and non-classroom like, practically useful and really suitable for professionals. 
Short, sweet, to the point 
Entire course is designed with the busy professionals in mind and the videos were created to make your online learning experience fruitful and easy.  It is a project based training.
Asynchronous programming with async/await keywords, modern real world solution
async/await keywords were introduced in C# 5.0. In traditional socket programming scenarios, (multi) threading is use to create a responsive server or client. I have bypassed that route and shown you how to use asynchronous sockets directly. I first explain you what are async/await keywords and then I show how to use these for non-blocking network I/O. This part of the puzzle in the key to high traffic enterprise applications.
Reinforced learning 
Each section contains a quiz on the end which is very helpful to ensure that you review and retain important bits of information imparted in relevant course section.
Join an active community
Become a part of the programmers community who have already taken this course. Your questions will be answered by the fellow students and the course instructor as well. Really a wonderful place to start learning!
Learn something new
Sockets are considered an advanced topic, a danger zone in programming parlance. Knowing it means you take your trade seriously.
Object Oriented Programming
This course teaches you how to create a distributed application using the principles of OOP. You are going to bridge the gap between the back-end C#.Net class library and the fron-tend WinForms application using an implementation of Publisher/Subscriber model based on EventHandler classes. This course also shows you what are event handlers and how to create your own event.
Bonus 
You will also learn how to resolve a hostname to IP Address using System.Net.DNS class. You'll also implement various sanity checks using tryparse and try/catch
https://www.udemy.com/tcpip-socket-programming-for-coders-using-csharp-net/?couponCode=HALF

You don't need to learn C to work on this course.

Socket Java, python socket udp

Sunday, May 19, 2019

UDP Socket Programming For Distributed Computing in C#.Net



This course teaches UDP socket programming in C# .Net in a hands on and easy fashion. It is a carefully planned and crafted course which takes the student by the hand and teaches them how to create production quality distributed network applications using C# .Net in a step by step fashion.

The first sections of this course cover the basics of computer networks, and UDP socket programming in CSharp dot Net necessary for network and socket programming.
Next two sections will teach how to send and receive UDP broadcast in a command prompt C# .Net application using synchronous sockets with method calls such as Socket.Send and Socket.Receive. You will also learn how to convert between string and byte data types.

Once you're familiar with how distributed network applications function, the course takes you towards asynchronous socket programming. You will also learn about callbacks methods and how you can implement callbacks in C# .Net. I will also show you the publisher subscriber model AKA pub/sub model. We will implement pub/sub model in our library project and the client/server applications using the library as well. We'll create event handlers, delegates, and raise events as well.

We are going to use an Object Oriented approach for this course following the principles of OOP. In next section we're going to implement a publisher/subscriber model in C# .Net to bridge the gap between the API solution classes and the WinForms based front end.

Next, you will learn what is JSON (JavaScript Object Notation) and how you can add JSON functionality to your C# applications with Newtonsoft JSON.Net. We'll start implementing an application level communication protocol in this section.
In the next section, you'll learn how to transmit binary data over a UDP socket in C# .Net. As an example, I'm going to show you how to transfer png image files between multiple clients of your applications through the server. The JSON based protocol implemented in previous section is going to play a key role here.

After watching this course, you'll be able to write your own distributed applications that communicate through the network, either WiFi or Ethernet. You will have the foundation knowledge needed to create C# .Net based applications for IoT, computer telephony, VoIP, online gaming(e.g. Unity), and much more.

This course also shows you how to use String Interpolation which is a C# 6 feature. You'll also learn how to debug network applications in Visual Studio and how to write code faster.

Discounted coupon code link for the UDP socket programming in C# .Net course. 

You don't need to learn C to work on this course.

Socket Java, python socket udp

Sunday, April 14, 2019

Code Recipe: How to generate random alpha numeric string in C# .Net



This C# .Net code is from the Code Recipes series of Test Automation TV YouTube Channel.
The full explanation of the code is available in the video.


public string GenerateRandomString(int stringLength = 10)
        {
            if(stringLength < 1)
            {
                stringLength = 10;
            }

            StringBuilder retVal = new StringBuilder();

            Random rNumberSmallCapsOrSpecialChar = new Random(DateTime.Now.Millisecond);

            int typeOfCharToGenerate = 1;

            for (int i = 0; i < stringLength; i++)
            {
                typeOfCharToGenerate = rNumberSmallCapsOrSpecialChar.Next(1, 4);

                switch (typeOfCharToGenerate)
                {
                    case 1:// generate a number
                        retVal.Append(rNumberSmallCapsOrSpecialChar.Next(0, 9));
                        break;
                    case 2: // generate a small alphabet
                        retVal.Append((char)rNumberSmallCapsOrSpecialChar.Next(97, 122));
                        break;
                    case 3: // generate a capital alphabet
                        retVal.Append((char)rNumberSmallCapsOrSpecialChar.Next(65, 90));
                        break;
                    case 4: // special char
                        retVal.Append((char)rNumberSmallCapsOrSpecialChar.Next(33, 46));
                        break;
                }
            }

            return retVal.ToString();
        }


  [TestMethod]
        public void MakeRandomString()
        {
            for (int i = 0; i < 10; i++)
            {
                Console.WriteLine(GenerateRandomString());
                System.Threading.Thread.Sleep(10);
            }
        }

This video also shows how to use Visual Studio 2019 test explorer to run tests.
Other topics included are


  1. typecasting of an int to a char in C#
  2. Using StringBuild.Append method
  3. Using Random class and Next method
  4. Specifying default parameter values in methods
  5. Using Sleep method call



Saturday, April 6, 2019

Visual Studio 2019 New Features


Visual Studio 2019 is  geared towards making developers more productive, and innovative. 
It introduces live code sharing, time travel debugging, data breakpoints, C++ low memory foot print, improved VS on Mac, improved power shortcut keys, and much.