Select Page

Category Selected: Automation Testing

152 results Found


People also read

OTT Testing

Hidden Hurdles: Challenges in OTT Platform Testing

Automation Testing

Playwright Cheatsheet: Quick Tips for Testers

Automation Testing

A Quick Playwright Overview for QA Managers

Talk to our Experts

Amazing clients who
trust us


poloatto
ABB
polaris
ooredo
stryker
mobility
Skills needed for Automation Testing

Skills needed for Automation Testing

As the software industry mature, delivery and operations team come closer for quick and seamless delivery. With the growth and strong practice of Agile based delivery which are followed throughout the software industry the need for reduction in testing life cycle without compromising the quality and coverage is necessary and thereby a lot of tightly integrated tools evolved in the past decade and skills needed for Automation testing also changed rapidly with the growing needs. This blog is going to describe the basic skills needed for Automation Testing irrespective of timeline.

Skills needed for Automation Testing

Software Testing tools evolved with the introduction of Record and Playback feature which mimics the user actions on the Applications under test. During initial days tools do not have additional features except with Application object management control. Software tester does not need programming expertise to utilize this tool.

Later tools evolved with the power of scripting language support where the Software tester would need scripting language knowledge and to understand the tool features like exception handling, regular expression along with basic framework creation capability.

2005 – 2010, many tools were introduced in the Market like Selenium which was backed by Programming language with OOPS conceptual support. Many Open source tools also come into play which needed programming language understanding along with complex framework creation. This needed a Software tester to have some development skills so that robust Automation scripts can be created.

There was a paradigm shift with the introduction and implementation of Agile adopted widely in the Software industry which necessitated the change of direction from testing to Business process validation and involvement of Business Analyst, Developers and Ops team to contribute to testing and TDD / BDD / ATDD evolved with continuous testing capability. These capabilities can be achieved only when Software Tester has a strong craving for programming. Roles like SDET came into play and DevOps as well evolved post-2010.

There was a need to do a release every fortnight and software testing timeline is shortened without compromising quality with increased testing coverage. This need necessitated the introduction of the scriptless tool in the market. Not only Record and Playback feature like the olden days, but also these tools come with DevOps capability with plug and play feature. This helped in increased automation productivity.

Future is going to be tools with AI and ML capability . This means a tester should have more Analytical skills, Mathematical knowledge along with the coding skills. With the industry evolved from normal web development to IoT, Mobile, Clouds, BigData, etc, Automation tester should have the understanding of Architecture of IoT devices, Clouds, etc along with Microservices which is evolving recently which sits in the middle layer to communicate between various devices.

Below are the Top-notch technology trends in 2020:

  • Hyper Automation (Automation tools with AI and ML capability)
  • Multi experience (Usage of Augmented Reality, Virtual Reality, multiple touchpoints, multi-channel touchpoint)
  • Cloud Infrastructure
  • Blockchain
  • IoTs

Analytical and Logical Reasoning:

This is one of the very basic requirements for any Automation Tester. This skill helps in breaking the problem into small packets and helps in coherently defining automation solutions. The more analytical and Logical reasoning skill an Automation Tester has the simpler and effective the solution he/she is going to give.

This helps in understanding the Business objective behind automation and helps in providing a solution to the team.

Domain Skills:

Whatever be the domain he/she is put up with, effective time should be spent in learning this domain. This helps in understanding the project in a better way and able to understand the scope.

Domain skills cover the following areas:

  • what is the business process involved in that domain
  • How the business outcome is measured in that domain
  • Who are the consumers involved and their skillset requirement (Operational Users related to this domain and their domain skills will help in understanding the End User perspective of that project)
  • What will be the future trend in that domain

Analysis should be done on External certification in that area and every Automation Tester should complete at-least basic external certification will help them in sustaining in that domain and be a better Automation Tester.

This skills helps in Automation Tester to play a crucial role in the team as nowadays with the reduction in team size, they will be the ever needed person for any project they work with.

Application Architecture:

With the understanding of Application architecture, Automation tester will play a crucial role in defining the right and long-lasting solution. Example ) The functional Testing team would have written Test cases for Web UI whereas underlying communication is done through Microservices which does the same functionality as UI. Automating Microservices is easy and stable and takes less effort as well. The understanding right solution to be targeted through Automation reduces the effort and helps Client as well in reaping the benefit of Automation.

This skill helps Automation Tester to enter as a Solution Architect.

Manual Testing:

This is one of the core skills required by any tester and is applicable for Automation Tester as well. Predominantly this helps in defining the data-driven approach and writing better re-usable to increase the coverage. It also helps in handling exceptions and reporting requirements in a better way. Every Automation Tester should work at-least in 1 Manual Testing project so that he can understand the Testing concepts and design principles in a better way which helps in Test effectiveness and efficiency. These skills help in writing better scripts with less maintenance effort.

Programming Language:

Since the underlying of any Automation tool is a language, every Automation tester should know at least one programming language. This skill in a language should be as good as a developer so that implementation will be better. Since most of the language is Object Oriented. Thorough knowledge of OOPS is a must and thorough implementation of all these OOPS concepts is a must. In order to evolve as an Automation Solution Architect, at-least 3 programming language with the skillset of a developer is a must Below is the trend in 2020 (Java, Python, JavaScript, Angular JS) and should aim to acquire this skill.

Knowledge of DevOps:

In the era of Continuous Testing, this knowledge is a pre-requisite for any Automation Tester.

Below are the core areas which Automation Tester should have an understanding

How to source control works. (Extensive knowledge on GiT, SVN, TFS tools and working knowledge of Distributed and Centralized source control is mandatory)

Knowledge of Development paradigm (Automated code review, Build creation, Build deployment, Build Monitoring and Release Management) helps an Automation Tester to sync up easily with the developers and communicate in a better way.

Automation Framework

Automation Framework should be stable and scalable to meet DevOps demand and hence building a robust Framework is a must

Handling data (Based on DevOps implementation there could be a limitation in tool infrastructure and knowledge on better data management like alternatives to Excel as XML or JSON skills are needed. A framework should have this capability

Test Management interface (Interfacing with Test Management for any Automation Framework is a must to have skills, knowing Test Management API calls can help in communicating with different modules of Test Management tools and helps in interfacing part)

Agile

Last but not the least, knowing Agile is a must. More than 80% of the project across the world uses Agile in their project and is now a must to know. Different techniques like Scrum, Lean, Kanban, XP, FDD are some of the popular Agile practices in the world. Every Methodology has different techniques of Estimation, gather requirements, defining scope, creating a backlog, etc. Awareness of these is a must.

Softskill

So far we have talked about Technical and Functional skills and now is the time to discuss soft skills needed for any Automation Tester

Oral and Written Communication skill (Within a team, with Management and with Client stakeholders)

Should be flexible to take up more work and adaptable to situation

Problem-solving skills

Team player (Able to gel well with the team)

Should be dependable and Trustworthy to sustain in the project

Managing self (Few areas like Time Management, Work-Life balance) is very critical

Windows Application Testing using FlaUI

Windows Application Testing using FlaUI

It is an Open-source UI based automation library to test your application which runs on Windows OS. It wraps almost all of the libraries used in the Microsoft UI Automation Test Library. We can use FlaUI libraries to automate win32, WinForms, WPF and Windows Store apps.

The below are the libraries provided by FlaUI, we will see the uses of those libraries against each one of them:

FlaUI.core – This Library will has base elements used in the concrete implementations of FlaUI.

FlaUI.UIA2 – This Library is used to automate win32 and winforms applications.

FlaUI.UIA3 – This Library is used to automate WPF and windows store apps.

Prerequisites: – You should have Visual Studio IDE installed in your machine.

Installation of FlaUI:

1. Create a New Project in Visual Studio

2. Right-click on the project and select “Manage NuGet Packages” (Using NuGet Package Manager)

3. Select the ‘Browse’ tab and Search for FlaUI, it will display the FlaUI libraries.

4. Install the below libraries from NuGet package manager

FLAui.core, Flaui.uia2, Flaui.uia3.

NOTE: The downloaded libraries are limited to the project, which means it is not available by default for all projects.

How to launch the application using FlaUI:

1) To start testing one should implement the static method “Launch” from the “Application” class which is available in FlaUI.Core library.

2) You should pass the application path (the application you installed in your machine and you want to automate) as a parameter to the Launch method as given in the below example.

Example:

var msApplication = Application.Launch(@"C:Program FilesMicrosoft OfficeOffice16WINWORD.EXE");
var automation = new UIA3Automation();
var mainWindow = msApplication.GetMainWindow(automation);
  

The above code tells you

1. How the launch method is implemented using the Application class, and how the application path is passed as a parameter (First Line).

2. In the second line, we are specifying the Automation Library Type (UIA3) used to automate the app.

3. The third line describes getting the main window instance from the application instance.

Searching an Element in the Application:

1) To find the element in the application, we need to specify the treeScope of the AutomationElement.

2) We can specify the AutomationElement by providing conditions like ConditionFactory, ControlType, and action to be performed as explained in the below example.

ConditionFactory cf = new ConditionFactory(new UIA3PropertyLibrary());
mainWindow.FindFirstDescendant(cf.ByName("Text Editor")).AsTextBox().Enter("FlaUI Tutorial");
  

Code Explanation:

1. The first line is creating the “ConditionFactory” instance, the “ConditionFactory” is the class from “FlaUI.Core”, “ConditionFactory” identifies the element based on the condition.

2. We are specifying the TreeScope {FindFirstDescendant()}, ConditionFactory{ByName()}, ControlType {AsTextBox()} and action {Enter()} of the automation element.

The above helps us to install FlaUI and run an application. We must know how to inspect an element using FLAUInspect. We need the Chocolatey package manager to install Flauinspect, we will see the step by step process of the implementation below.

1. Chocolatey is the package manager for windows. The Flauinspect is a package under the Chocolatey package manager. So it is mandatory to install Chocolatey to inspect the AutomationElement.

2. Go to https://chocolatey.org/install and follow the instructions to install Chocolatey.

3. After installing chocolatey, run this command “choco install flauinspect” in command prompt to install Flauinspect.

4. To launch Faluinspect, run this command “flauinspect”, it will open the Flauinspect application.

Working with Flauinspect:

There are three ways for inspecting an element

Open Flauinspect > go to “Mode” >

1. Hover Mode (Press ctrl and move your mouse pointer focus on the target element)

2. Focus Tracking ()

3. Show XPATH, (combine with any mode listed above) and it will show only the absolute XPath.

Capture Screenshot with FlaUI:

Flaui provide a “Capture” class for the screenshot

Capture.screen();
// It will capture the full screen

Capture.Element("That Element ");
//It will capture the specific element 

Capture.Rectangle("Specify the height, width and length")
//It will capture the specific block you specified in the parameter.
  

We can store the screenshot in a file by using the below lines of code:

var image = Capture.Screen();
image.ApplyOverlays(new MouseOverlay(image.DesktopBounds));
image.ToFile(@"c:tempscreen.png");
  

NOTE: ToFile(“Your_Location”) method can be used to store the screenshot in a user-specified location.

Perform Mouse Action using FlaUI

The Flaui provides the Mouse Class with different methods as follows:

1. Mouse left click

Mouse.LeftClick();
// left click where the mouse pointer is currently pointed to.
  

2. Point

Point point = new Point(2435, 234 )
// This will provide the location of the mouse pointer (X-axis and Y-axis).
  

3. Middle Click

Mouse.Click(MouseButton.Middle, point);
  

4. MoveTo and MoveBy and Position

Mouse.MoveTo(point)
// Will position the mouse pointer to the New location
Mouse.MoveBy(point)
// it will take the current location and add the point specified in the method then drag the mouse to the location specified.
Mouse.Position(point)
// the traces of the mouse pointer are not displayed.
  

5. Scroll

Mouse.Scroll(10)
// positive value to scroll up ; Negative Value to scroll down

Mouse.HorizontalScroll(40);
Mouse.VerticalScroll(30);
  

Perform Keyboard Action using FlaUI

To perform any action the application via Keyboard, the FlaUI provides the Keyboard class with the following methods:

Keyboard.Type("Hello Flaui");   // for a string
Keyboard.Type(VirtualKeyShort.Key_B, VirtualKeyShort.Key_C);
Keyboard.Press(VirtualKeyShort.BACK)  // backspace

//For Combinations of multiple keystrokes (To press a key and release a key)
Keyboard.Pressing(VirtualKeyShort.CONTROL);
Keyboard.Press(VirtualKeyShort.Key_A);
Keyboard.Release(VirtualKeyShort.CONTROL);

//Another Way for the combinations key
Keyboard.TypeSimultaneously(VirtualKeyShort.CONTROL,VirtualKeyShort.KEY_A);

  

NOTE: VirtualKeyShort is available in “FlaUI.Core.WindowsAPI” package

How to highlight the element in FlaUI:

Flaui provides the “DrawHighlight” method which will highlight the AutomationElement.

Automation_Element.DrawHighlight();
  

Thank you for reading the above article, we would love to hear your comments. Please write to us if you face any issue in using FlaUI, we are happy to help. Happy Testing!


Frequently Asked Questions

  • What is FlaUI?

    FlaUI is an open-source .NET library based on the native UI automation libraries of Microsoft that can be used to automate UI-based testing of Windows applications such as win32, WinForms, WPF, and Windows Store apps.

  • Is FlaUI open source?

    Yes, FlaUI is indeed an open-source UI-based automation library that can be used to perform Automated UI testing of Windows applications such as win32, WinForms, WPF, and Windows Store apps.

  • How do I install the FlaUI library?

    1. Create a new project in Visual Studio.
    2. Right-click on the project and select “Manage NuGet Packages”.
    3. Select the ‘Browse’ tab and Search for FlaUI.
    4. Install the FLAui.core, Flaui.uia2, Flaui.uia3 libraries.

Automation Testing Tools We Use

Automation Testing Tools We Use

We at Codoid use various automation testing tools. In this blog article, we would like to share the tools that we use and why. As a Test Automation Services Company, using multiple test automation tools/libraries has become inevitable for us to address automation testing challenges. If you don’t know how to use a tool, then your output will be a mess. In-depth knowledge of various automation testing tools is must to deliver high quality automated test scripts. Let’s see the tools we use for automation testing.

Web Application Automation Testing

For web application automation testing, we use Selenium WebDriver & Protractor. Python, Java, C#, and JavaScript are the programming languages which are predominantly used to write test automation scripts. To enable effective collaboration with the clients’ SPOC, Gherkin steps are written using Cucumber and Behave BDD frameworks. Our Automation CoE Team suggests Selenium best practices periodically to produce quality automated test scripts.

Desktop App Test Automation

To automate desktop app test cases, we use White Framework and Test Complete. White Framework is an open source library to automate desktop applications. Automating a desktop application using White Framework is no cake walk. It requires in-depth knowledge on White Framework, Win32 API, and C#. As an automation testing company, we have helped our clients to automate their Desktop test cases using both White Framework and Test Complete.

Mobile App Automation Testing

For mobile app automation, the best choice is Appium. Once the automated test scripts are ready for mobile app test cases, we run them on cloud real-devices using BrowserStack and Kobiton platforms.

Big Data Automation Testing

Firing all the validations SQL queries manually on daily basis is a boring task for a tester. We have setup an automation testing framework using Python and LemonCheeseCake library to compare source and target data. If your team needs any help in automating data quality validations, contact us to explore our test automation solution.

In Conclusion

The most apt automation testing tools will invariably lead to successful test automation. As a leading software testing services company, automation testing is one of our core services. continuous learning and following up automation best practices help us to deliver robust test automation suites to our clients efficiently

Everything you need to know about Test Automation and Microservices

Everything you need to know about Test Automation and Microservices

Microservices are important to the companies who want to build and deploy systems that are scalable, flexible, adaptable, and easy to develop. Automation tests are therefore needed to take things to live regularly. Microservices are modular and independently deployable as small composable components and thus are separately testable. As testing scales up from small independent microservices through integration and end-to-end testing to larger services ecosystems, it influences the testing pyramid.

So what is a Microservice?

Microservices is a part of software architecture. It involves developing single applications that can work together as a suite of small services, each running its process while communicating with HTTP resource API mechanisms. They require minimal centralized management systems and various data storage technologies and are written in multiple programming languages.

Service-Oriented Architecture (SOA) vs. Microservices

An SOA model is a dependent Enterprise Service Bus (ESB), whereas ‘Microservices’ use faster mechanisms. SOA focuses on imperative programming, and microservices use a responses-actor based programming style. SOA models also have outsized relational database management systems, yet microservices databases like NoSQL or micro-SQL connect to conventional databases. We can conclude that the architecture methods thus differ in how each creates an integrated set of services.

Service layer and test automation API Tests

Deploy multiple versions of service API’s in parallel and make sure that the version number appears at the endpoint address. When we create a microservice, service layer testing is complemented with API tests.

Let’s discuss five approaches to automation tests for microservices.

Unit testing

It is internal to the service and is the largest in terms of volumes. It should be automated based on development language and framework. Written at unit level or collection of units as the goal is to check parts of the software to validate for functionality.

Contract testing

It treats each service individually and independently call them to verify their responses. It also reframes testing principles and maps it to service layers of a testing pyramid. Considered a cost-effective substitute for integration tests.

Integration testing

Perform verification of the services that have been individually tested and check the functioning of inter-service communications. It validates if the system works seamlessly and that the dependencies between the services are present as expected. Limit the volume of full integration tests and write layer integration tests to ensure proper integration.

End-to-End (E2E) systems testing

E2E testing verifies if the entire process flow works correctly and includes all service and database integrations. Frameworks help automate functional testing by checking that the system behaves as expected when you deploy your application in a real-world environment.

Interface testing

User Interface (UI) testing is the final level of automation testing and checks the system in a
real-time end-user scenario before the application goes live.

The benefits of microservices in a large scale systems development is still contested. That’s why we recommend you install microservices only if a regular SOA does not meet your needs. If you are considering microservices, look no further than Codoid . As a test automation services company, we ensure that all testing is performed by the right set of qualified personnel to give the best quality output to our customers. Our testing tools accelerate testing for better productivity and shorter time to market. As automation tests are an essential requirement to create successful microservice architectures, we work together with our clients to help them deploy their products by giving them the best return on their investment with us.

Selenium Wait Commands using Python to Avoid False Positives

Selenium Wait Commands using Python to Avoid False Positives

We all know that Selenium has three wait types (Implicit, Explicit, and FluentWait). How to avoid false positives using Selenium waits? Applying wait for all FindElement steps using Implicit Wait is not a right approach. If you are automating a small website or writing some Web scraping scripts, you can go with Implicit Wait. However, if you are writing automated test scripts for an web application, then our recommendation is Explicit Wait. Moreover, Implicit Wait applies the wait time for the entire browser session and you can change the wait time during run-time, however, you can’t do it for individual FindElement method call. As an automation testing company, we use Selenium Explicit Wait to avoid false positives as much as possible. In this blog article, you are going to learn Selenium Wait Commands using Python.

Implicit Wait

As we mentioned before, use Implicit Wait for simple website or Web scraping scripts and don’t mix Implicit and Explicit Waits. When you automate a full regression test suite, it requires proper Page Load and AJAX call handling using Explicit Wait. Note: By default, Implicit Wait is disabled.

from selenium import webdriver
driver = webdriver.Chrome(executable_path='chromedriver.exe')
driver.get("https://codoid.com")
driver.implicitly_wait(10)
  

Visibility of Element Located

Checking the presence of an element in DOM will not suffice our need. In addition to that the scripts need to confirm whether the web element is displayed on the web page or not. Selenium Explicit Wait has visibility_of_element_located method to check whether the web element is available in DOM and Height & Width is greater than ‘0’. Most of the automation testers are aware of this method/technique. However for novice QA automation testers to write robust automation test scripts this will be a much useful tip. Your developers can hide web elements for different reasons using the below CSS attributes.

<input type="text" id="txt1" style="opacity: 0"/>
<input type="text" id="txt1" style="visibility: hidden"/>
<input type="text" id="txt1" style="display: none"/>
<input type="text" id="txt1" style="position: absolute;top: -9999px;left: -9999px;"/>
<input type="text" id="txt1" style="clip-path: polygon(0px 0px,0px 0px,0px 0px,0px 0px);"/>
  

Note: If any HTML tag is styled using clip-path, Selenium’s visibility check does not work. This may be an issue with Selenium. Let’s wait for the comments.

from selenium import webdriver
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as cond
from selenium.webdriver.common.by import By
from selenium.common.exceptions import TimeoutException

driver = webdriver.Chrome(executable_path='chromedriver.exe')
wait = WebDriverWait(driver, timeout=10)

try:
    driver.get("http://google.com")
    wait.until(cond.visibility_of_element_located((By.NAME,"txt")))
except TimeoutException as e:
    print("Timed Out")
finally:
    driver.quit()
  

Wait for JavaScript Alert Presence

JavaScript Alert will pops out on your web browser after its invocation. One should use wait mechanism while handling JS Alert to avoid script failure. Sometimes, due to Ajax call response delay, JavaScript Alert invocation will also be delayed. However, your automation script should wait for the expected delay to handle the alert.

wait.until(cond.alert_is_present)
  

Selenium Explicit Wait using Lambda Expression

You can also use Python Lambda Expression to simplify the Selenium Explicit Wait commands.

elemnt = wait.until(lambda d: d.find_element_by_id("txt"))
elemnt.send_keys("Codoid")
  

In Conclusion

As a leading test automation services company, we at Codoid follow best practices to develop robust automation testing scripts. We hope you have learnt the nuances of Selenium Explicit Wait techniques to avoid false positives from this blog article. Contact us for your automation testing needs.

How to Choose the Right Team for Automated Testing

How to Choose the Right Team for Automated Testing

Executing successful test automation is far more than just writing code. It requires a highly-skilled team that is disciplined to create long-term and innovative sustainable automation.

Here are some critical factors while building your team for automated testing:

1: The reality check is that sustainable test automation can’t be made quickly or easily. That’s why a competitive test automation team must be hired so that they can maintain the software and add new features or functionality in the future. Hire experts to assemble the right QA team to design your automation framework and test scripts. A dynamic team will be able to evolve with the changing needs of your app testing. Many businesses hire third-party companies to build test automation for them, and it is necessary to find a reputable one that adopts a sustainable plan for automation tools.

2: Choose an ideal candidate with a good track record as a team leader of your automation test team because this is a critical hire. The team should be skilled in building reusable code, leveraging functions, creating well-documented methods, and intuitive naming conventions. Avoid candidates who mention record-and-playback test automation development process or keyword-driven approaches since these are not effective automation techniques and return nil on investments. Look out for manual testers who can leverage automation as a tool for efficient and consistent test-case execution. Team members should be pro-learning and follow the approach and framework decided at the beginning.

3: Bring onboard specialists like a principal developer who has a robust methodology background who can positively contribute to the growth and scalability of your app/web. Such an infrastructure specialist will focus on framework development, test management, remote execution, etc. As your team grows, such areas of app/web development will become critical to your success, and additional niche specialists for reporting, analysis, project management, and administration will become a necessity.

4: Ensure that you have sufficient team members running QA for you so that you are adequately covered throughout the entire SDLC. The automation team equips tools and languages for the manual testing team. Sometimes it is better to hire or outsource to an automated testing services company where you get access to quality assurance leaders who can monitor the usage of automation by identifying problems.

The easiest way to switch to automated from manual testing would be to take help from an automation expert who will oversee the process.

If you already have a project where you need automated testing skills, then get the goals and strategy defined by this expert and identify critical issues.

You need appropriate instruments like tools and frameworks, and employing an experienced automated tester will help establish a path for you to switch from manual testing to automation.

To make the switch, you’ll have to set up the environment which requires software and hardware, and this will take time and resources and while increasing costs.

Slowly switch the process with few testers and ensure there is proper management to avoid errors by being well-documented. A skilled automation expert will simplify this process.

At Codoid, a test automation services company, we believe that the priorities in automated testing should be as follows project, team, and then tools. First, you should analyze your product, then select the right team to solve issues and choose tools that will assist your QA testers. Whether it’s an app or website decide what browsers, functions, and OS’s you want it to support. The more familiar you are with the latest technologies used in the development, the better your testing strategy will be. If you need your software to be perfected, contact our team of expert QA engineers.