Skip to content

Contains the code and test data for running the automation tests

License

Notifications You must be signed in to change notification settings

anup-nehe/mosip-automation-tests

 
 

Repository files navigation

Automation Tests

Overview

This repo contains test framework for end2end testing of MOSIP functionality. The following functionality is covered

  1. Registration
  2. Pre-registration + registration
  3. Authentication

Components

  1. API automation mosip-functional-tests
  2. E2E automation (this repo)
  3. Packet Generation tool (this repo)

Execution flow

Prerequisites

For Windows

  • Java (11) and Maven software should be installed on the machine from where the automation tests will be executed
  • Git bash

Repository details

Below are repository details of various modules used for the automation

DSL Orchestrator

Packet Utility(Packet Generation tool)

Build and run

To build end to end automation

  • Authentication Demo Service mvn clean install
  • Automation Tests mvn clean install
  • Acceptance Tests(location: mosip-automation-tests\mosip-acceptance-tests\ivv-orchestrator) mvn clean install
    • After Successful build will get the jar (ivv-orchestrator-1.2.0.1-SNAPSHOT-jar-with-dependencies.jar)

To build Packet Utility

  • Mosip Test Data Provider mvn clean install
  • Mosip-Packet-Creator mvn clean install
    • After successful build will get the jar (mosip-packet-creator-1.2.0.1-SNAPSHOT.jar)
    • Packet Utility is used to create and uploads the packet which is used by the e2e automation

Configuration - Packet Utility

  1. Download deploy folder
  2. Download Anguli from https://dsl.cds.iisc.ac.in/projects/Anguli/
  3. Iris database take permission from IIT Delhi to use IRIS Database from https://www4.comp.polyu.edu.hk/~csajaykr/IITD/Database_Iris.htm
  4. Download vcredist_x86.exe https://www.microsoft.com/en-us/download/details.aspx?id=48145 ( Note : one time activity it will be installed as a service , no need to do it again for any further update)
  5. Download and build MockMDS from mosip-mock-services.
  6. Set device certificates as per the environment and keep certificate under each modality keys. See MDSdevicecert.md.
  7. Start Mock mds by executing batch file (location: deploy\mockmds\run.bat) and verify its running on port 4501(default port)
  8. Update ..\config\application.properties with the following details
    • mosip.test.baseurl=https://qa.mosip.net
    • server.port=8080
    • mosip.test.temp=/temp/ (create empty 'temp` folder inside current directory e.g. D:\temp)
  9. Update ..\resource\config\default.properties with the following details
  10. Update ..\run.bat as mentioned below spring.config.location should have the absolute path of application.properties, e.g. -Dspring.config.location=..\deploy\config\application.properties
  11. Keep mosip-packet-creator-1.2.0.1-SNAPSHOT.jar and execute run.bat
  12. Verify if the Packet utility is running by hitting http://localhost:8080/swagger-ui.html#/
  13. For any failure in the packet utility verify the logs location: deploy\runlog.txt
  14. Deploy folder structure looks like

Configuration - DSL Orchestrator

  1. Build the E2E_Automation acceptance test project and get the jar mosip-automation-tests\mosip-acceptance-tests\ivv-orchestrator\target
  2. Take the config folder from the mosip-acceptance test project mosip-automation-tests\mosip-acceptance-tests\ivv-orchestrator\src\main\resources\config
  3. Take the local folder from the mosip-acceptance test project mosip-automation-tests\mosip-acceptance-tests\ivv-orchestrator\src\main\resources\local
  4. End to end folder structure looks like below
  5. Command to execute the e2e automation (ivv-orchestrator-1.2.0.1-SNAPSHOT-jar-with-dependencies.jar) utility with below vm arguments
    • java -Denv.user=environment name -Denv.endpoint=baseurl -Denv.testLevel=smoke -DscenarioSheet= -Denv.langcode=eng -jar ivv-orchestrator-1.2.0.1-SNAPSHOT-jar-with-dependencies.jar
    • env.user = environment name example qa, qa2, dev
    • env.endpoint = base environment
    • scenarioSheet = scenariosheet.csv ( which we want to execute)
    • env.testLevel = smoke
    • env.langcode= eng (default language of the target environment)
  6. After the execution completes, the test report can be found in the path ..\testng-report\emailable-report.html

DSL execution logs

  1. We can verify the failure in the logs mosip-acceptance-tests\ivv-orchestrator\src\logs\mosip-api-test.log

License

This project is licensed under the terms of Mozilla Public License 2.0.

About

Contains the code and test data for running the automation tests

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Java 95.0%
  • Handlebars 4.1%
  • Other 0.9%