Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Test case building process illustrationDescription

Step 1)

Selenium includes a recorder that captures the interaction between the user and the browser. The capture of the interaction is stored in the form of a Selenium script.

Step 2)

The translation of the Selenium script is translated into a JUnit Test Case to which it is necessary to make adjustments for the interpretation of the actions.

Step 3)

The Java Unit Test is suited for a generalized use in multiple language contexts.

Step 4)

The test bench encapsulates a set of features and properties that are necessary to parameterize the execution of test cases. This step aims to integrate the test case into these execution parameters.

Step 5)

Once integrated into the test bench, the test case can be triggered by the development in a singular way or in batch mode according to the needs of the moment.


...

3) Technical Notes

Where you can find the Test bench (vivo-regression-test) tool

the regression testing tool available in this github directory https://github.com/vivo-community/vivo-regression-tests

Componants architecture

The figure below shows the architecture of the VIVO-regression-test tool's main components. The architecture is divided into two parts: 1) the client-server side and 2) the client-side.

On the server side, the architecture includes a TOMCAT server running multiple instances of VIVO. The management of these instances is not properly part of this tool, it belongs mainly to the UQAM-DEV tool. On the other hand, the test bench is also an Eclipse project which can be integrated into UQAM-DEV. The availability of multiple concurrent VIVO instances ensures the development of comparative tests between different VIVO implementations (e.g., unilingual VIVO (actuel version 1.11.1)). VIVO i18n, Other VIVO configurations to be evaluated).

On the client side, each test case is an instance of both the Selenium and TestNG frameworks. Selenium consists of a robot programming interface that simulates human interactions on a web site through a web browser while TestNG is used to schedule the progress of the regression test. Each interaction through the user interface is evaluated and measured to validate the accuracy and consistency of the information produced by the VIVO instance being tested. During possible updates (addition/deletion/modification) of data, the test case can evaluate the accuracy of the data stored in the triplestore through the Apache Jena APIs. The 'Main Test Runner' is the main application that coordinates the execution of suites (aTestSuite) and test cases (aTestCase). The MainTestRunner exists in two forms. The first form starts its execution by the Maven utility and is set up by configuring the pom.xml and settings.xml files. The second form is a Java application which is parameterized by the configuration of the TestRunner.propreties file.


Image Added

Test Bench Java Package Structures

The figure below shows the structure of the Java packages in the test bench. Each package is associated with a label describing the package's usefulness.


Image Added

Unit Test Java Class Diagram

The figure below shows the java class structure for the ResearchOverviewToPersonUnitTest_{$linguistic-context} test case. The test case is particularized for each language context to be evaluated (en_CA, en_US, fr_CA and orig). Each test case is an instance of the abstract class (e.g. ResearchOverviewToPersonUnitTest.java) that contains the test sequence to be performed. Finally, the TestBenchModel class is the super abstract class from which all the test cases of the test bench are derived. This abstract class encapsulates all the functionalities and properties of the test bench. The MainTestRunner is responsible for the execution of each test case,

Image Added

Utilities Resources Files and Java Class Diagram

The diagram below shows the utilities classes and resources files necessary for test bench operation.

Image Added

Phases Structure Pattern of a Java TestNG Class

In general, each test case is divided into 5 phases in addition to the setUpBeforeClass et tearDownAfterClass

Five phases pattern of testCaseDescription
setUpBeforeClass
  • Opening Silenium Driver
  • Choosing the Vivo tested instance (I18n or non-i18n instance)
  • Purge Tripestore from instance statement (previus sample data manipulation
  • loading sampleData
Phase 1
  • login from the UI
Phase 2
  • Adding Data by UI
  • verify in the triplestore if the data is correctly added
Phase3
  • Modifying Data by UI
  • verify in the triplestore if the data is correctly modified
Phase 4
  • Delete Data by UI
  • verify in the triplestore if the data is correctly Deleted
Phase 5
  • Log out
tearDownAfterClass
  • Closing Selenium driver

...

Anchor
run_a
run_a
4 ) Running A Test Case in the TestBench under UQAM-DEV

Prerequisite

  • UQAM-DEV installed under Windows-10
  • GITBash In Windows Case
  • Include the appropriate Selenium driver in the ./lib directory. The current distribution contains the driver for Firefox 64 Bits under Windows 10.
  • A complete installation of VIVO 1.11.1 and 1.11.2-SNAPSHOT (VIVO-i18n)

Introduction

Faire le sommaire des étapes

Step 1: Installing:

Warning

Using Windows GitBash

UQAM-DEV

This is not a mandatory step. On the other hand the references to the directories that will depend on C:/UQAM-DEV, which is its installation directory.

For complete installation, following: 2. Installing UQAM-DEV