Start your demo and save on the first 12 months!

Blog

Web Functional Testing.

Posted by on 15 October 2020 in Blog

Web Testing is the process of testing a website or a web application. It checks for functionality, usability, security, compatibility, performance of a web application. Web testing ensures that a web application is fully functional and running smoothly and securely.

This paper will focus on functionality testing.

Functional web testing aims to ensure that each function of the web application operates according to the requirement specifications. The goal of this type of testing is to verify each function of the web application, by providing appropriate input and verifying the output against the functional requirements.
Functional web testing ensures users navigating a website can successfully perform a specific task such as signing into an account, adding an item to a shopping cart, submitting a form… Every action that a user may take should be checked to make sure the web application is performing as defined in its (explicitly stated or implicit) specifications. By this approach the tests should be as close as possible to the real use of the web application.

Web based functional testing includes tests for all the (internal and external) links in web pages, forms used for submitting or getting information, database connection, Cookie testing, etc.

Functional web testing mainly involves black box testing and doesn’t consider the source code of the web application.

 

Web Automation

Web Automation is the process through which a web application is tested by a test tool (robot) rather than manually. In simple words, it consists of running web tests automatically. This means automated web functional tests can be easily repeated for multiple times with different data sets against different versions of the web application.

A web automation tool is a piece of software that can identify the web elements to test and manipulate them accordingly, by performing actions like click, type and select.

Web automation is a powerful tool that provides significant cost savings to organizations (=> shorted test cycles), and allows testers to focus on creating new tests (=> higher test coverage) rather than performing repetitive, error-prone manual tasks.

The following paragraph of this paper will focus on how to successfully create and run an automated functional test for a popular website like Amazon using Maveryx test framework.

 

Web testing with Maveryx

Let’s try to create a Maveryx test script in Java that would:

1. Navigate to Amazon.com
2. Sign-in into Amazon account
3. Add a SONY PlayStation 4 to cart
4. Buy it

To open Amazon.com from Chrome browser you have to create a web-application launch file, ‘amazon.xml’, like the one above:

To navigate to Amazon.com add this code in your java test script:

To sign-in into Amazon account:

1. Click ‘Hello, Sign in’ to go to the Sign-In page
2. Enter Email or mobile phone number and click ‘Continue’
3. Enter Password and click ‘Sign-In’

And here is the java code snippet:

The class GuiHtmlElement allows you to manage generic HTML objects (e.g. span, div…).

Once logged, enter the text ‘SONY PlayStation 4’ into the search box on the Amazon.com home page and press ENTER.

To complete the test, select the ‘SONY PlayStation 4 Slim 1TB Console…’ item, add it to the shopping cart and proceed to checkout.

Using Maveryx you don’t need to capture an Object Repository storing the objects to test. In this case, you don’t have to record the UI objects in Amazon.com.
Maveryx is able to automatically identify and locate the test objects directly at runtime during test execution.
The designed test script is immediately executable. Enjoy!


CONCLUSION

Functional Web Testing is the software testing activity that focuses on web applications to detect if those are functionally correct with respect to specifications. Web testing can be performed manually or with the help of automated testing tools (Web Automation). Maveryx test framework supports web application testing. Automating tests with Maveryx can save a lot of time in testing and it helps organizations to release web applications with fewer defects.