Sunday, October 31, 2021

The Value of Mixing UI and API Testing

 Implementing API testing without UI testing or vice versa is like having a pizza without cheese. Though many organizations are likely testing both layers, there are teams that are focusing on just one or the other or don’t have a framework in place in order to test both effectively.

This article discusses the importance of testing at the API and UI level and how having a single framework for both helps speed up the development cycles.

Importance of Testing at API layer

The use of API-driven architectures and even more so now with microservices has opened businesses to a hidden layer of risk. In fact, some of the most significant vulnerabilities are hidden in the non-human interface of the API. It comes with an added benefit that you can test the business logic of the application without the need of the UI, in a stable way.

Importance of Testing at the UI layer

UI is the first impression of the application. Testing at the UI layer involves testing the application while considering:

  • Usability
  • Errors
  • Look and feel

It is important to test the UI in all aspects as ultimately it all depends on the end-user or the client whether the application will pass or fail. No matter how good you are at coding or database, the moment a user can’t complete a request through the UI, it’s all a waste.

Nature of UI and API Checks

When a team has a robust test pyramid it can help the team in shipping the features faster with high quality. However, most illustrations of the test automation pyramid show unit tests at the bottom and UI tests at the top of the pyramid. However, typically this pyramid ignores an orthogonal view that takes into consideration UI, API and database tests. Combining UI and API tests in particular gives a far greater force multiplier for the testing as shown the figure shown above.

API and UI Together

The typical structure of three-layer architecture deployment would have the presentation layer at the top that consists of a user interface that displays the content and information to the end-user. The business layer contains the functional business logic which drives an app’s core capabilities and the database layer consists of the data storage system. On the UI side, you can test the user experience, looking at layout errors, or presentation of data in the UI. On the API layer, you can test business logic, boundary errors, and data variants.

Thus by providing UI and API testing as well as UI+ API testing the overall quality of testing can be improved significantly as listed below

The API layer is an ideal place for data testing

Example: Suppose there is a product page on an eCommerce site to order a T-shirt. That T-shirt may have two designs, one for women and one for men, and may come in five different sizes and five different colors in each size. Testing all those permutations manually on the UI side is very difficult. However, at the API level, you can create one script that passes data for the input and have a separate file for each data combination and loop through them all in just a matter of seconds. That’s why the API layer is an ideal place for data testing.

However, testing only at the API layer won’t cover all the potential risks for the companies. Though Api automation testing enables the QA teams to test every possible combination in business logic, UI testing is the only way to ensure that the data gets accurately translated to the API from a user’s perspective

With both UI and API layer in place, you get a much higher test coverage

With UI and API testing implemented together, you are always covered with respect to

  • Business logic testing
  • Hidden scenario testing
  • App usability testing

Building a single test automation framework perfectly joins two corners of the house, i.e. API and UI which help in expediting software development cycles.

You can test that the API layer of your app performs correctly with the GUI layer of the application by analyzing how API is processing the commands given by the user interface while performing specific steps.

Conclusion

Implementing a single framework for UI and API testing is an ideal approach to understand your app end-to-end which also helps in addressing the core issues with respect to quality at the source of the problem.

At Webomates, API and UI testing are done in parallel to make sure both business logic is working as expected and usability issues are fixed from the user perspective. For API testing, we emphasize on performance and security testing to ensure thorough testing of the API. For UI testing, we use various testing tools and the Galen framework for visual testing of the applications. Exploratory testing is used as an added layer of testing to expand the scope of tests and enhance the quality level.

Friday, October 22, 2021

Top 5 API Testing Challenges Solved With AI

 API aka Application programming interface connects various layers of a software application and enables the communication between them. A typical software application has three layers: The presentation layer, Business layer, and Database layer. APIs work within the gamut of the business layer which encapsulates the business logic of the application.

APIs have a predefined exchange protocol, expected inputs, set of data processing operations, and desired outputs. Different clients can use the API without worrying about the business logic, as long as they adhere to the defined rules for using that particular API. In nutshell, APIs act as a formatted contract between client and API service provider to ensure that they communicate with each other seamlessly. API testing verifies and validates this contract by checking the compatibility and interactions between various services. 

There are several tools that are used for API testing, like SoapUI, Postman, JMeter etc. Irrespective of the tool that is used, there are certain challenges which are common across the board with API testing.

Challenges in API testing

With the rise of micro-service architecture and cloud-based systems, APIs have become even more important as they facilitate communication between various services. Testing these APIs is vital to ensure glitch-free communication between the services. However, API testing can face certain roadblocks since they work with heterogeneous systems.

Challenges in API testing
  • Test data generation and management

APIs accept predefined parameters as inputs, execute a process based on input parameters and return the output to the calling module/API. An API needs to be tested thoroughly for a variety of valid/invalid inputs. This leads to a huge amount of data sets that need to be generated and maintained for reusability. The generation and maintenance of data and keeping it current is a huge overhead for the testing team.

  • Parameter validation

As stated above, input parameters play a key role in API testing. APIs should be tested for various combinations of data inputs. The number of possible test combinations rises exponentially with the increase in the number of input parameters. APIs can be invoked from different modules, or from other APIs, this further adds complexity in parameter exchange, especially in the case of large-scale software applications. Sometimes, limited knowledge about the APIs gives rise to situations where an invalid parameter is passed to the API. The test cases should be designed to test all such possible scenarios. 

  • Call sequencing in API testing

Every software works on the basic premise of the correct flow of logic. Correct call sequencing to APIs and submodules is important to ensure that the flow is not disrupted. In the case of a multi-threaded environment, it can become a huge challenge. Additionally, API call sequences need to be checked all over again after bug fixes and/or functionality changes.

  • Keeping test suite updated

An API needs to be updated every time there is a change in business logic. Maintaining API version inventory and ensuring that the test suite is in sync with the changes is an extremely important and equally tedious task.

  • Monitoring and reporting

APIs throw an error every time there is a test failure. The failure could be a true failure (as expected), or a false failure. API tests need to be closely monitored and the result of testing should be communicated to the involved teams. But with multiple sprints in Agile and multi-threaded systems, monitoring and reporting can be a herculean task.

How AI can help in overcoming API testing challenges

Software testing augmented with the power of artificial intelligence can help in overcoming the challenges mentioned in the previous section.

overcoming API testing challenges
  • Managing test inputs

AI adds value to API testing by understanding and learning from the data patterns and combinations. It can then generate a huge volume of test data for the input parameters. AI-based test modules can effectively create a massive data pool by trying various combinations. This saves the time and effort of the testing team.

  • Helps in generating test cases

AI-based testing can contribute significantly by generating test cases for proper call sequencing and parameter validation by understanding, recognizing, and analyzing the call sequencing and various parameter combinations. Thus, taking the workload off the testing team and freeing them up to focus on other aspects of testing.

AI-based test systems also ensure that the test suite is always updated based on new feature additions or modifications in already existing features.

  • Continuous reporting and feedback

Every test cycle generates reports which have to be analyzed and shared with the testing and development teams. However, doing it manually after every test cycle is a time-consuming job. AI-based testing and reporting systems help in generating reports, analyzing, and sharing them with ease across the board.

Webomates and API testing

Webomates’ patented AI-based testing framework helps in overcoming API testing hurdles by generating test cases with minimal manual involvement, executes them, analyzes the results, and provides detailed reports. Sounds simple enough? That is exactly our intention, to make API testing easy for our customers.

Webomates CQ works in a well-knit ecosystem of ingenious AI engines which make API testing quick and easy.

Our codeless engine generates API tests from a basic script.

API-testing

This process adds scalability to the testing process. For any changes in API, the script can be altered and the test engine generates a detailed test case.

Once the scripts are executed, our Intelligent Test Automation framework takes over to prepare detailed test reports in an easily comprehensible format. Every successful test is reported and for every failure, a detailed test failure analysis is done by our AI Defect Predictor.

We specialize in API performance and API security testing

Webomates’ AI based testing framework makes API testing more efficient for its customers.
If you are interested in learning more about the API testing services offered by Webomates, click here to schedule a demo. You can also reach out to us at info@webomates.com

Thursday, October 21, 2021

Why do you need Test Automation in 2021!

 It’s the golden era of Test Automation! You cannot talk about the latest practices like DevOps, Continuous Delivery and Continuous Testing without the term Automation. With the power of automation, Testing has taken a ‘moonshot’, transforming the way the world looks at Testing. 

In a traditional software development environment, testing would get completed at the end of the development cycle. Also, manual testing is time-consuming and prone to errors. Organizations are now translating their manual test cases to automated testing to achieve Quality-at-Speed, lower the risk factor and improve the test coverage.

 Agile and DevOps have changed the way the code is developed, tested and deployed. Development and QA teams are under tremendous pressure to have a working version of the software within each sprint. The software is always in development and must be deployment-ready at all instances making testing mandatory at every stage of the delivery pipeline. And Continuous Testing and Test Automation are the keys to its success.

According to the World Quality Report, there is an increase in the adoption of Agile and DevOps. With the growing risk and complexity of software development, teams are on the hook to keep quality high. This has resulted in QA teams becoming orchestrators of quality.

So What exactly is Test Automation?

Test Automation is a method in software testing that leverages automation tools to control the execution of tests. Test automation is also called automated testing or automated QA testing.

According to the MarketsAndMarkets report, “the global test automation market size is anticipated to rise from USD 12.6 Billion in 2019 to USD 28.8 Billion by 2024 at a CAGR (Compound Annual Growth Rate) of 18.0 per cent during the prediction period”.

So What exactly is Test Automation

Types of Automation Tests

Let us look at the types of tests that can be automated and how they help test every aspect of the system enabling users to achieve a frictionless experience.

  • Unit Tests: How well does your single unit of code work independently? 
  • Integration and API Tests: How well does your system work when all units are integrated? Does it make or break the system? How well does your system work with external systems? 
  • Regression Tests: How well does your system work when you add a new feature to your existing one? Has your software “regressed” after the new update?
    Every time you add a new feature or functionality, you need to check if there is any impact on the existing features
  • Performance Tests: How well do your software handle load and stress? How well is the responsiveness and stability of your software?
  • Smoke Tests: How well is your software’s stability? How well are your software’s functionalities working? Are there any showstoppers?
  • Security Tests: How well is your software secure from any vulnerabilities?

Criteria to Choose Which Tests to Automate?

The more automation you do, the more time you save. But this doesn’t mean you can automate everything! So, how do you choose the type of test cases that can be automated?

To get the maximum Return on Investment (ROI), automate the test cases that fall under the following criteria:

  • High Volume and Repetitive tests that need to be run for every build like the smoke test, regression tests 
  • Business-Critical Tests
  • Tests that need to run over multiple configurations/browsers/devices/OS/environment/hardware 
  • Non-functional tests like performance, stress and load tests
  • Time-consuming manual tests

Implementing a Test Automation Strategy

Quality, Agility and Continuous delivery go hand-in-hand in the software development cycle.

The Test Automation Strategy defines a framework for automated test scripts. It calls for automating tests at different levels.

Unit and Integration testing represents the base and majority of this test automation pyramid. Next comes, service layer, or API testing where the API tests are executed against the service layer.

And finally at the top of the pyramid are the GUI tests that validate the application as a whole at the presentation layer. Top it up with exploratory testing that identifies potential edge cases. Unlike scripted testing, exploratory testing uncovers unique and out-of-scope defects that would have otherwise been missed.

Implementing a Test Automation Strategy
  1. Defining the automation scope
    Defining the scope can be tricky for many teams due to the magnitude of the project’s features and functionalities. Answering these 2 questions can help the team to formulate a better scope and provide the stakeholders a bird’s eye view of the scope.
  1. Which are the features that need testing?
    This defines the area of the application which will be automated.
  2. What is the testing approach for each of the selected features?

Defining the scope will help keep all the teams on the same page.

  1.  Selecting the Right Test Automation Tool
    A tool may be the best in the market, but is it right for you? 

    A right tool can help you reinvigorate and accelerate the success of your automation journey. There are a plethora of tools available in the market to choose from based on your project requirement and scope of automation.

Consider the following parameters while choosing the best tool based on your requirement:

  • Availability of extensive test reports and analytics
  • Learning curve/Ease of use with a user-friendly interface
  • Ease of test creation and maintenance 
  • Support

  1. Planning, Designing and Developing 
    To plan an automation test strategy, you need to consider your goals for the testing process and the timelines for executing the test cases. Accordingly, you need to:
    a. Develop the test scope
    b. Develop the test cases
    c. Develop the test suites
  1. Execution and Reporting
    To execute the automated testing scripts, you need to be ready with the input data. Reports would be generated based on the test execution results.

Benefits of Automation Testing

Testing has to be repeated every time there is a change. Automating the tests can reap multiple business benefits like:

  • Higher Test Coverage – Increases the depth and scope of the tests 
  • Reusability of Test Suite – Once a test suite is defined, it can be easily replicated for various other use cases.
  • Real time analysis – Instant reporting helps to reduce the feedback loop between developers and testers
  • Eliminates human error – Manual testing is prone to errors. Automated tests can execute the steps precisely and repeatedly leaving no room for any human error, especially for complex scenarios.  
  • Faster feedback cycle – The defects are identified at an early stage giving ample time for the developers to fix the defects and ensure faster validation.  
  • Faster time to market – With early defect identification and resolution, the time-to-market rapidly speeds up.
  • Increase team morale. As the mundane, repetitive and manual tasks get eliminated, teams can divert and invest more time in other priority and productive activities.

Conclusion

Continuous Testing is a must for continuous delivery, and it requires test automation throughout the delivery pipeline. With recent advancements, automation clubbed with AI/ML helps in accelerating the speed of deployment and reducing the common risks and pitfalls that come with continuous delivery.

The advantages of test automation are limitless. All in all, test automation is necessary to speed up the development and deployment of software releases. It not only helps organizations to save time, but also helps in delivering high quality products.

To maximize the benefits of automated testing, Webomates CQ believes that following a formal quality assurance process is imperative for a successful release. Along with shifting left the testing process, our QA team embeds intelligent automation and continuous testing principles right across the software delivery pipeline. With a perfect blend of Agile, DevOps, patented AI Defect Predictor tool and a test automation framework, Webomates can help you achieve a hassle-free release, every time!

Wednesday, October 20, 2021

7 Steps to Get Started with Shift Left Testing

 

The Goal of Shift Left Testing

Have you ever experienced a project running into budget issues, schedule slippages and getting delayed due to some last moment defects? These issues are so common so the answer is, probably yes! 

The need to implement large, business and customer critical systems in an environment driven by short timelines and tight budgets has led to a change in methods that deliver business value quickly. One such method is Shift-Left Testing.

It is 15 times costlier to fix defects in the test phase of a waterfall project because testing occurs later in the project development lifecycle.

IBM SYSTEM SCIENCE INSTITUTE REPORT

Relegating the entire testing to the last stage just before deployment is no longer feasible.
So, how do we fix this? The answer is simple – Shift Left your entire Testing!

According to Larry Smith – who coined the term Shift Left Testing – “Bugs are cheaper when caught young!” The Shift Left testing approach uses the ‘test early and often’ mantra to perform testing earlier in the life cycle (thereby moving left on the project timeline). The goal is to prevent defects and mitigate risks rather than deal with a whole load of bugs and critical issues post-development. Shift Left testing avoids cost overruns and project delays.

Do you really need to Shift-left your testing?

If you answer ‘Yes’ to all these questions, Shift left is the key!

  1. Do you want to automate different testing types like Unit Testing, Functional TestingAPI TestingSecurity Testing?
  2. Do you want to start feature testing at an early stage to ensure quality releases?
  3. Do you want to detect defects early in the development lifecycle?
  4. Do you want a smaller and quicker feedback loop between the development and testing teams?
  5. Do you want to have maximum test coverage of your functionalities?

How can you Get Started With Shift Left Testing

Shift left does more than just help teams find defects early. To shift left means a change in organizations culture.

How can you Get Started With Shift Left Testing

Now let’s find out what your teams need to do to get started with shift left testing.

get started with shift left testing.
  1. Identify & Plan the Testing Lifecycle
    Planning is an integral part of the shift left approach. Shift left works best when the Test analysts identify and plan the entire testing lifecycle before the start of the actual development process. This provides a strong starting point for all activities in the test lifecycle, and will help all business and operational stakeholders, developers and testers understand the tasks, objectives and expected outcome from the project. 

    One way of doing this is by identifying testing requirements right from the project planning and requirements specification phase. Test planning includes budget, resources, testing strategies, and other project requirements. This helps teams focus on quality from day one of the project, rather than waiting for defects to be uncovered late in the software development lifecycle.
  1. Induce Developer-based testing approach
    The main role of a developer is to code new features or enhancements as per the requirements. However, testing is no longer an activity that is done by a tester. 

    As the developers are most familiar with their own codes, they can rigorously test their code to rule out any errors and check the application’s functionality. It is also important to ensure that the new code does not give rise to any defects when integrated with the application’s existing functionality. So testing the code as soon as it is developed ensures quicker defect identification. It expedites the process of exposing and fixing coding errors. It helps in reducing uncertainty in a unit. Development testing aims to eliminate coding errors before the code is passed on to the QA team. A perfect blend of both Developer-based and QA-based testing would ensure easy defect identification along with quality feature release.
  1. Code review quality checks
    Collaboration is the key to success. To ensure higher code quality, all developers must agree to conform to the same coding standards. 

    With the developers now contributing to the testing efforts, the testers can focus on defining quality checks for the developers’ scripts and to focus on exploratory, security, and performance testing.
  1. Use the same tools
    One of the major issues faced by the testing team is the inability to create automated tests using the same tools as used by the developers. This becomes a roadblock for testers creating the automation framework. A best practice is to use the same technology stack that the developers are using.
  1. Feature Test your software 
    Feature Testing is the process of making changes in a software to add new features or to make modifications in the already existing features. Testing these features is extremely important and delivering software incrementally necessitates the Development and QA teams to work collaboratively to deliver a build. 
    For every incremental build, Webomates CQ can create, execute, maintain, analyze test cases and generate defects for browsers, mobile, Windows and API applications. Exact state of the system in terms of bugs is known after every check in. With stringent code quality checks, the defects are detected at an early stage hence are easier to fix, ultimately resulting in improved quality of each feature.
  1. Engage in Test Automation
    In this DevOps driven landscape, it is highly recommended to adopt test automation in order to avail maximum benefit out of Shift Left testing. With test automation, developers and testers can automate the entire build to test process across all the stages of software development.

    It’s not just about having test automation. The issues that need to be addressed are:
  • Coverage:  How much automation? 
    Defining a smart test strategy holds the key to successful automation testing. Here is the list of factors that can help you  to determine whether you should automate a test case or not:
  1. Automation complexity
  2. Average script creation time
  3. Desired speed of regression
  4. Frequency of releases
  5. Stability of the build
  6. Rate of change/addition of test cases
  • Healing: How up-to-date are the test suites?

    Intelligent Automation is the key! When new changes are introduced, either by the developer due to the ever-changing requirements or during the integration or build process, there is a chance that the automation may fail due to the predefined test scripts. It is then very difficult to identify which test cases should be modified or added.

    Webomates applies AI and ML algorithms to its self-healing test automation framework to dynamically adapt their testing scope to the changes. The AI ML power combo can learn if there is a change made, and then automatically modify the test automation script to fix the problem.
  • Run time coverage: How much of the automation should be run?

    For example, if you have 500 test cases/scripts you might run 125 test cases/scripts in integration tests for a particular module and 40 test cases/scripts in a development environment.
  1. Define a  Continuous Feedback Mechanism
    To address gaps immediately, it is advisable to define a continuous feedback mechanism to continuously provide feedback to developers during and after the development stage. It also becomes easy to report defects and achieve desired quality since with continuous monitoring and feedback, the chances of errors tend to reduce over time.

    Webomates adopts intelligent automation solutions to support developers to operate with quality and agility. What usually takes others a week, Webomates gives you the results within 24 hours for a full feature testing, and 8 hours for a module testing with healed test cases.

    At Webomates, we make the whole testing process better by addressing the following gaps in our test reports.
  • Coverage issues 
  • Environment problems 
  • Locus of defects

To address the thousands of hours lost by QA professionals, Webomates created its patented AI Defect Predictor tool and shared true Pass and true Fail reports with the development team along with an in-depth analysis of automation failures. This AI Defect Predictor is provided to the development and QA teams that use CI/CD service to help them reduce their triage time. 

For 300 test cases with a failure rate of 35% (105 failed test cases), it usually takes 12 hours to triage the results and identify the false positives. Using the Defect Predictor, the time taken drastically reduces to 2-3 hours. 

How Webomates can help you in shifting your testing left?

Shift Left testing provides an effective means to perform testing in parallel to development processes, enabling faster, better and quality applications and enhancing collaboration between development, operation, and testing teams. With Webomates CQ as TAAS (Testing as a Service), it’s a lot easier to identify and fix the defects in the staging environment itself.

With a perfect blend of Agile, DevOps, patented AI Defect Predictor tool and a test automation framework, you can accelerate your Testing Journey with Webomates and provide your developers an opportunity to resolve high-risk issues before users ever encounter them.

Along with shifting left the testing process, our QA team embeds intelligent automation and continuous testing principles right across the software delivery pipeline. Empowering the QA teams with such real-time self-healing capabilities using the new-age intelligent technologies helps in realizing the true business value and also empowers the organizations in providing value to the customer.

Read our articles on Shift Left Testing in Agile and Skip Security Testing at your own risk to understand how Webomates can help you in building a good product where UI, API, Load, and Security are not left out to be tested as a different component at the end.

Friday, October 15, 2021

Ad hoc testing vs exploratory testing

 In the software testing arena a commonly asked question is whether Exploratory testing is same as the Ad Hoc Testing? They do have some overlap which causes confusion, but in reality they are quite different. Both provide the freedom to the test engineer to explore the application and the primary focus is to find critical defects in the system. They also help in providing better test coverage, as all scenarios are extremely time consuming and costly to document as test cases.

Exploratory Testing

Ad hoc vs exploratory testing

Exploratory testing is a formal approach of testing that involves simultaneous learning, test schematizing, and test execution. The testers explore the application and learn about its functionalities by discovery and learning method. They then, use exploratory test charters to direct, record and keep track of the exploratory test session’s observations. It is a hands-on procedure in which testers perform minimum planning and maximum test exploration.

Webomates has also done extensive research on how to high jump to high quality using exploratory and detailed analysis can be found in the article written by Aseem Bakshi, Webomates CEO.


Ad Hoc Testing

Ad hoc vs exploratory testing

Ad Hoc Testing is an informal and random style of testing performed by testers who are well aware of the functioning of software. It is also referred to as Random Testing or Monkey Testing. Tester may refer existing test cases and pick some  randomly to test the application. The testing steps and the scenarios depend on the tester, and defects are found by random checking.

Comparison is inevitable when it comes to exploring different testing types. It is vital to understand and employ the right combination for a complete multi-dimensional testing. In this article, we will compare Ad Hoc Testing and Exploratory testing to understand them better.

Ad Hoc versus Exploratory Testing

Ad hoc vs exploratory testing


If you want to know the difference between test case based testing approach vs exploratory testing click here

Conclusion

Aforementioned testing types are just two, from a vast set of testing types at QA team’s disposal to verify and validate any application. Ideally, a combination of different techniques is used for comprehensive testing. Webomates offers a regression testing service that uses AI Automation and automation supplemented with manual testing (test case based and exploratory-based)and crowdsourcing together to guarantee all test cases (even modified ones) are executed in 24 hours. If you are interested in a demo click here Webomates CQ

In the software testing arena a commonly asked question is whether Exploratory testing is same as the Ad Hoc Testing? They do have some overlap which causes confusion, but in reality they are quite different. Both provide the freedom to the test engineer to explore the application and the primary focus is to find critical defects in the system. They also help in providing better test coverage, as all scenarios are extremely time consuming and costly to document as test cases.

If you want to know the difference between test case based testing approach ad hoc testing vs exploratory testing click here



Generative AI: A Force for Change or Replacement?

  The dawn of Generative AI marks the beginning of a new era, much like the rise of the Force wielders in the Star Wars galaxy. Applications...