Posts Tagged ‘manual testing’

API Automation with Rest Assured

Monday, June 29th, 2020

Introduction of Rest API

Rest-Assured is a Java-based library that is used to test RESTful Web Services. We can build a customized HTTP Request to send to the Restful server. This allows us to test a variety of Request permutations and in turn test various combinations of main business logic.

Rest-Assured library also provides the capability to authenticate the HTTP Responses accepted from the server. For e.g. we can verify the Status code, Status message, Headers and even the body of the response.

What is Rest Assured?

REST Assured library is the best tool to automate your rest api’s. Rest Assured has a gherkin type syntax.

List of few Rest Assured features:

  • DSL-like syntax
  • XPath-Validation
  • Specification Reuse
  • Easy file uploads 

All these features support in handling api tests in a very well managed way.

Why Are We Using Rest Assured?

REST Assured offers a number of other useful features for writing tests for RESTful APIs. Let’s take a look at some of them.

  • Technical response data validation
  • Data-driven testing
  • Support for authentication mechanisms

The benefits of REST Assured

Aspects of REST Assured which makes it a most appropriate library for API testing:

  • In traditional development we have to write a large amount of code to set up http connection, send a request and receive and parse the response, while with the rest assured a lot of boilerplate code is not required to be written.
  • Since REST Assured is a Java library, integrating it into a continuous integration / continuous delivery setup is a breeze, especially when combined with a Java testing framework such as JUnit or TestNG


Challenges behind API Automation Testing:

Initial Setup

Foremost obstacle in any automation testing is initial setup. If the initial setup is too much complicated, then enthusiasm goes down as the time passes. Most people, even companies, put automation testing on hold or leave in the middle and proceed with the manual testing. This is one of the major blockers in automation of the testing process. If initial setup is easy-going, then implementation of the testing framework / tool will be much easier and highly achievable.

Maintenance

Second major barrier is maintenance. Once you have created your test suites for any release. Then the query comes in your mind, is it easy to maintain those test suites over a period of releases? If improving those test suites takes a good amount of effort, then it is worse than the manual testing. If upgrading time is less than we can easily maintain those test suites.

Management

Third obstacle is management and is to some extent related to maintenance. Management makes the tasks of organizing test suites easier and more maintainable. If you have linked your API test cases with API Specifications, then proper management can give you answers to the questions like whether your API is fully tested or not.

Skilled Resources

Fourth hurdle is skills required to use the library / tool. If we adopt a tool / library, then we should have people having those skills set required for the usage of the tool. In the range of REST API, we can benefit from the tools in which no technical skills are required to validate REST APIs because REST APIs are platform independent and language agnostic.

Integration with existing ecosystem

Fifth hurdle is integration with the existing ecosystem. It is important to know how well the library / tool integrates with your build or defect tracking system (or any other). Whenever you prepare a new build, it should fire the automated test suite first and if all the test cases pass, only then the build is ready to be released in the market. And if the validation fails, then your automated test suite should automatically log bugs against the failed test cases.

What is Jmeter?

Friday, June 19th, 2020

The Apache JMeterTM is pure Java open source software, which was first developed by Stefano Mazzocchi of the Apache Software Foundation, designed to load test functional behavior and measure performance. Apache JMeter is a testing tool used for analyzing and measuring the performance of different software services and products. It is a pure Java open source software used for testing Web Application or FTP application.

It is used to execute performance testing, load testing and functional testing of web applications. JMeter can also simulate a heavy load on a server by creating tons of virtual concurrent users to web server

What is Performance Testing:

Performance Testing is defined as a type of software testing to ensure that software applications will perform well under their expected workload. It focuses on certain factors of a Software Program such as:

  • Speed – It Checks whether the response of the application is fast.
  • Scalability – It determines the maximum user load.
  • Stability – It checks if the application is stable under varying loads.

It is very important to verify whether the product meets expected or required performance. Unfortunately, we figure out this pitfall post-delivery of the product. But performance has become an inevitable factor nowadays, especially for web and mobile applications as the user strength is very huge for each application.

Tools used for Performance Testing:

Performance testing is significant in real time, particularly from a point of view of customer satisfaction. There are several performance testing tools available such as:

  • Apache JMeter
  • LoadRunner
  • WebLOAD
  • LoadUI
  • LoadView
  • NeoLoad

How does JMeter perform Testing?

Let’s have a look at the different steps performed by JMeter during testing:

  • It creates a request and sends to the server.
  • It receives the response from server, collects them and visualizes those details in a chart or graph.
  • It processes the response from the server.
  • It generates the test result in several formats such as text, XML, JSON so that the tester can analyze data.

Apache JMeter – How is works?

The web server handles or carries loads of lots of applications & its user, so there is a need to know how JMeter helps us to handle the performance of Web server to manage simultaneous users or their applications. 

For Example: Online purchasing site, how they handle their sale when there are lots of users are accessing the same page of the product. To handle or check that kind of performance of application or server we must do a high performance or a load testing using JMeter.

There are three different approaches to JMeter testing:

  • Performance Testing – This testing used to test the performance of site configuration of infrastructure & helps us to get results Quickly & easily before we transfer the application in Production environment.
  • Load Testing – This testing is used to check the extreme load of a system that can be aimed to handle.
  • Stress Test – This test tries to break the system by crushing its resources.

Plugins & Protocols:

JMeter works with different plugins & Protocols, Also Off-site developers can simply spread JMeter with custom plugins.

 JMeter works on many protocols which are: 

  • Web Services – SOAP / XML-RPC
  • Service – POP3, IMAP, SMTP, FTP
  • Web – HTTPS sites ‘web 1.0’ web 2.0 (ajax, flex and flex-ws-amf), HTTP 
  • Messaging Oriented service – JMS
  • Database – JDBC drivers, Directory – LDAP

Working features of JMeter:

JMeter works as a number of users send a request for accessing some server & shows the performance by the listeners like tables, graphs etc. 

Characteristics of Apache JMeter

Why People choose Apache JMeter for Performance & Load testing. Here are some characteristics which are mentioned below:

  • Open source application – Apache JMeter is an openly available free tool & it facilitates users or developers to use the code for other development or modification purpose.
  • Platform independent – It can run on any platform & also it is capable enough to check the load & performance of any server requests.
  • User friendly GUI – Its user-friendly, simple & easy to understand.
  • Write your own test – Using Jmeter we can write our own test cases. It uses a text editor to create a test plan and supplies in XML format.
  • Simulation – JMeter can parallelly work with threads to generate a heavy load on the server.
  • Installation – It’s easy to install on different OS like:
    Run the “*.bat” file to use JMeter
    Mac – JMeter can be accessed by typing the Mr. jmeter.sh
    Linux/Unix – JMeter can be accessed by clicking on a JMeter shell script.
    Windows – JMeter can be accessed by starting the JMeter.bat file.
  • Record & Run: JMeter provides the facility to record the steps by using Blaze master add-on & run with any number of threads & listeners.
  • Support multi-protocol: JMeter works on web application testing and database server testing and supports protocols such as JDBC, HTTP, LDAP, SOAP, JMS, and FTP.

JMeter is a pure Java application and should run correctly on any system that has a compatible Java implementation.

Here is the list of an operating system compatible with JMeter:

  • Linux
  • Windows
  • Mac OS
  • Ubuntu

JMeter GUI: Test Plan & Workbench

As soon as you launch JMeter, you will see 2 elements

  • Test Plan
  • Workbench

What is a Test Plan? Test Plan is where you add elements required for your JMeter Test.

It stores all the elements (like ThreadGroup, Timers etc.) and their corresponding settings required to run your desired Tests.

What is WorkBench? The WorkBench simply provides a place to store test elements temporarily. WorkBench has no relation with Test Plan. JMeter will not save the contents of the WorkBench. It only saves the contents of the Test Plan branch.

Hope this blog helps you to make you clearer about the Apache JMeter. Feel free to share your queries OR any feedback for the same.

Decision Making Via Decision Trees in Manual Testing

Friday, June 19th, 2020

Overview

Decision table testing is a software testing technique used to test system behaviour for different input combinations. This is a systematic approach where the different input combinations and their corresponding system behaviour (Output) are captured in a tabular form. That is why it is also called as a Cause-Effect table where Cause and effects are captured for better test coverage.

Why Decision Table Testing is important?

  • In Software Testing, boundary value analysis and equivalent partitioning are other similar techniques used to ensure better coverage.
  • They are used if the system shows the same behaviour for a large set of inputs.
  • However, in a system where for each set of input values the system behaviour is different, boundary value analysis and equivalent partitioning technique are not effective in ensuring good test coverage.
  • In this case, decision table testing is a good option. This technique can make sure of good coverage, and the representation is simple so that it is easy to interpret and use.
  • This table can be used as the reference for the requirement and for the functionality development since it is easy to understand and cover all the combinations.
  • The significance of this technique becomes immediately clear as the number of inputs increases. Number of possible Combinations is given by 2 ^ n, where n is the number of inputs.

Use Case of Decision Table Testing:

How to make Decision Table for Login Screen

Let’s create a decision table for a login screen

Email- ************.com
Login- XYZ

Password-########


The condition is simple if the user provides correct username and password the user will be redirected to the homepage. If any of the input is wrong, an error message will be displayed.

ConditionsCase 1Case 2Case 3Case 4
Username F T F T
Password F F T T
Output E E E H

Notations:

  • T – Correct username/password
  • F – Wrong username/password
  • E – Error message is displayed
  • H – Home screen is displayed

Interpretations:

  • Case 1: Username and password both were wrong. The user is shown an error message.
  • Case 2: Username was correct, but the password was wrong. The user is shown an error message.
  • Case 3: Username was wrong, but the password was correct. The user is shown an error message.
  • Case 4: Username and password both were correct, and the user navigated to homepage.

While converting this to test case, we can create 2 scenarios:

  • Enter correct username and correct password and click on login, and the expected result will be the user should be navigated to homepage.

And one from the below scenarios:

  • Enter wrong username and wrong password and click on login, and the expected result will be the user should get an error message.
  • Enter correct username and wrong password and click on login, and the expected result will be the user should get an error message.
  • Enter correct username and wrong password and click on login, and the expected result will be the user should get an error message.

Conclusion:

When the system behaviour is different for different input and not same for a range of inputs, both equivalent partitioning, and boundary value analysis won’t help, but decision table can be used.

This table will help to make effective combinations and can ensure a better coverage for testing. Any complex business conditions can be easily turned into decision tables.

In a case we are going for 100% coverage typically when the input combinations are low, this technique can ensure the coverage.

Manual Vs Automation Testing

Thursday, June 11th, 2020

In this article we are going to talk about advantages of Automation Testing over Manual testing.

What is Manual Testing and Automation Testing?

Manual testing is performed by hand. Quality Assurance (QA) specialists ensure that applications work properly by following conditions written in test cases. Despite its primitive nature, manual testing is still important, as certain functionality simply cannot be automatically tested. For example, wearables and mobile devices can require field testing in a physical environment. Mobile applications often undergo ‘monkey tests’ that detect bottlenecks during unpredicted stressful conditions. For instance, what happens if a user forgets a mobile device in their pocket with an application running and they tap the screen unintentionally? Is it possible that they’ll crash the app? Only manual testing can account for these scenarios.

Automation testing is a Software testing technique to test and compare the actual outcome with the expected outcome. This can be achieved by writing test scripts or using any automation testing tool. Test automation is used to automate repetitive tasks and other testing tasks which are difficult to perform manually

Now let’s discuss automated and manual testing in detail.

Automation Testing:

As per Industry standards and specialization our QA team automates the following types of testing:

Unit Testing is a level of software testing where individual units/ components of the software are tested. The purpose is to validate that each unit of the software performs as designed. A unit is the smallest testable part of any software. It usually has one or a few inputs and usually a single output.

Functional Testing is Software testing performed in order to detect the actual performance of an application’s functional requirements. Functional testing usually considers accuracy, interoperability, compliance, security, and suitability.

Regression Testing is defined as a type of software testing to confirm that a recent program or code change has not adversely affected existing features. Regression Testing is nothing but a full or partial selection of already executed test cases which are re-executed to ensure existing functionalities work fine

Graphical user interface (GUI) testing of software interfaces to check if the GUI meets all requirements.

These are the most common types of testing that we automate. Manual testing requires people and time, while automated testing reduces the demand on both resources. Also, automatic tests eliminate the risk of human error, making code more reliable. Now let’s see what tasks we can solve by automated testing.

Why you need automated testing?

Automated Testing Saves Time and Money

Software tests have to be repeated often during development cycles to ensure quality. Every time source code is modified software tests should be repeated.  Automated software testing can reduce the time to run repetitive tests from days to hours.

To handle repetitive tasks. If you’re constantly adding the same features or executing the same operations in a project, then the flexible nature of automated tests can be a great time saver.

To eliminate human error. Since automated tests are powered by tools and scripts, the chance of missing a bug or a defect decrease. This makes the testing process more reliable and time efficient.

For advanced GUI testing. Automated GUI tests detect and record differences in behavior between platforms — for example, across different web browsers or operating systems. Also, automated GUI testing effectively finds regression errors.

To test load and performance. There’s essentially no manual alternative for testing load and performance. Automated tests simulate hundreds and thousands of simultaneous users.

Why do you need Manual Testing?

Despite the seemingly broad coverage of automated testing, manual testing shouldn’t be underestimated. In fact, you have to test software manually before you run automated testing. Even though manual testing requires much effort, without it you cannot be sure that automation is possible. One of the key testing principles is that 100% testing automation is impossible. Manual testing is still necessary.

Let’s see which tests cannot be automated (or would take too much effort to automate):

Ad hoc testing is executed without preparation and writing test cases. During ad hoc testing, a QA specialist randomly tests the functionality of the system; his aim is to be creative, “break” the system and discover flaws.

Exploratory testing is defined as simultaneous learning, test design, and test execution. It is an approach to testing that values the tester as an integral part of the test process and shares the same values as the Agile Manifesto: Individuals and interactions over processes and tools. That’s how exploratory testing differs from ad hoc testing: in exploratory testing, you rely on your personal experience and design test cases in the testing process. An ad hoc testing can be done by any person without preparation.

User interface testing – By executing user interface tests, a QA specialist validates the properties and states of interface elements. Also, the QA team ensures that design elements in the interface match elements in the final layout.

As we can see, some tests should be performed manually. This especially relates to tests that focus on user interfaces and usability. Although we could automate basically everything, manual testing still provides an effective and quality check of bugs and improprieties.

The cases where manual testing has no comparison

UI Acceptance- Manual testing comes in handy when you test user interfaces, especially their visual aspects. Automated tests simply cannot detect colors of images or links, font sizes, gestures, and highlighting. Imagine that your application has a bug that causes a link to be so tiny that you can barely see it. Manual testers will immediately detect this bug, but automated tests are not able to notice the defect.

Initial development stage- Manual testing helps testers to detect bottlenecks during the initial development stage which results in less time and resources being spent on fixing bugs. Sometimes it’s not rational to invest money and human resources in automated testing during an unstable phase of a product’s development. However, in some approaches to software development, automated testing is a part of the process at any stage.

Short-term projects-Even though automated tests are aimed at saving time and resources, it takes time and resources to design and maintain them. In some cases, such as building a small promotional website, it can be much more efficient to rely on manual testing.

Non-automatable cases-Some tests cannot be automated; this especially concerns hardware-related tests. Writing scripts for automated checks of sensors, touchpads, and screens are almost impossible and rarely viable. Also, some data can be tested only manually. For example, you can automatically test if printer prints, but checking the quality and content of printed images is best done manually.

Conclusion

Manual Vs Automation Testing each have their strengths and weaknesses. What we want to stress is that no matter how great automated tests are, you cannot automate everything. Manual tests play an important role in software development and come in handy whenever you cannot automate the process.

Recent Posts

Recent Comments

Get In Touch

Ask Us Anything !

Do you have experience in building apps and software?

What technologies do you use to develop apps and software?

How do you guys handle off-shore projects?

What about post delivery support?