Skip to content

An environment of Metamorphic Testing for web testing with Selenium

License

Notifications You must be signed in to change notification settings

Noctino52/Morfify

Repository files navigation

Project status License GitHub issues

Mortify is still in it's first releas, any new versions will be pubblished here.

Morfify

A Metamorphic Test solution for Web Application
Project developed for the apprentiship and three-year degree thesis from degree course in Computer Science at "Università degli studi di Napoli Federico II" (NA,Italy).
Accademic year: 2020/2021

Read this in other languages: Italian.

How to start

The application actually don't have any installer and for this must be imported in the own IDE for be executed.
Frist you need to create a new one repository Git, do a copy of the original repository, to then effect the mirror of the local copy.
From Command line of Git:

$ git clone --bare https://github.com/Noctino52/Morfify
$ cd Morfify
$ git push --mirror https://github.com/Noctino52/Morfify
$ cd ..
$ rm -rf Morfify

Brief description

Morfify is an eviroment of Metamorphic Testing for web application.
It uses the Metamorphic Testing technique to potentially test all the functionality of any program, simply starting from a test case (Source test case) registered with Selenium IDE.
With the use of a Metamorphic Relation, a property expressed in code of a function of the expected program, Morfify is able to create test cases with slight difference on the input, called Follow-up test cases and to verify if these tests are "similar" in terms of the contents of the pages visited during their execution.

To show the potential of the eviroment, there is an example of use with the PetClinic sample web application.

Is a testing framework and indicates a suite, composed of different tools: Selenium IDE, Selenium WebDriver, Selenium Builder, Selenium Server, Selenium Grid; in our case, we used the frist two.
Provides a domain language (DSL), which is a specification language dedicated to problems in a specific domain or to a particular technical solution.

Allows you to write tests for the major programming languages, including Java, Python, Ruby, C# and PHP.

PetClinic is a web application for management of a veterinary clinic, allows the addition/search of animal owners, as well as the addition of the latter and their visits to the clinic.

Is composed by varius Spring framework like:

  • Spring Server
  • Spring Bootmk
  • Spring Authentication

The application allows you to choose to save the DBMS with in-memory technology (H2) or in the traditional way (MySql).

Architettura del sistema

Morfify is composed by five part:

ComponentiMorfifyEN

1.Source test case creation:Is the component that takes in input the test case to be executed, it is a JSON parser (TestCaseCreator) which takes as input a file generated by Selenium IDE and transforms it into an object of the TestCase class; trivially it is the component that brings the input into the envirement.
2.Follow-Up test cases creations: Is the component that takes care, starting from a copy of the source test case, to apply the changes imposed by the set of rules given in input. The output of the system in question is always one or more TestCase objects defined as a Follow-Up.
3.Test case esecution: With the API of Selenium WebDriver, both input and generated test cases are run.
4.Round-up of pages: During the execution, a listner (DESIGN PATTERN Builder) is supported that keeps track of the page changes, both from a code point of view (HTML, CSS etc ...) and trivially visual (Create a screenshot for each page), the execution of a test case becomes an ordered list of pages that are visited and will be an integral part of the output.
5.Verify: Through the information collected during the execution of Source and Follow-Up test cases, the pages visited by the source and those of the various Follow-ups are compared; the pages must be "near-similar" to each other otherwise a Source test case Faulty will have occurred.

Directory structure

The folder src contains the application of PetClinic (main) and the source code of Morfify (test).
The folder testFile contains where they will be taken the file .side registered with Selenium IDE.
The folder documentazione contains all the documentation around Morfify.
The folder Output contain an ordered list of pages for all Source and Follow-Up test cases created and produced during execution.

Documentation

For further information, refer to chapter three, four and five of the degree thesis associated with this project.

Author

Ivan Capasso (Founder)

Luigi Libero Lucio Starace (QA)

Copyright

Copyright (c) the respective contributors, as shown by the AUTHORS file.

This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.

You should have received a copy of the GNU Affero General Public License along with this program. If not, see http://www.gnu.org/licenses/.