|
| 1 | + |
| 2 | +### Contains |
| 3 | +* This folder contains performance Test script of below API endpoint categories. |
| 4 | + 01. Create Identities in MOSIP Identity System (Setup) |
| 5 | + 02. Third Party Certificates (Setup) |
| 6 | + 03. S01 Authentication with OTP (Preparation) |
| 7 | + 04. S02 Authentication with Biometrics (Preparation) |
| 8 | + 05. S03 Authentication with Demo (Preparation) |
| 9 | + 06. S01 Authentication with OTP (Execution) |
| 10 | + 07. S02 Authentication with Biometrics (Execution) |
| 11 | + 08. S03 Authentication with Demo (Execution) |
| 12 | + 09. S04 EKYC with Biometrics (Execution) |
| 13 | + |
| 14 | + |
| 15 | +* Open source Tools used, |
| 16 | + 1. [Apache JMeter](https://jmeter.apache.org/) |
| 17 | + |
| 18 | +### How to run performance scripts using Apache JMeter tool |
| 19 | +* Download Apache JMeter from https://jmeter.apache.org/download_jmeter.cgi |
| 20 | +* Download scripts for the required module. |
| 21 | +* Start JMeter by running the jmeter.bat file for Windows or jmeter file for Unix. |
| 22 | +* Validate the scripts for one user. |
| 23 | +* Execute a dry run for 10 min. |
| 24 | +* Use MOSIP_TPS_Thread_setting_calculator.xlsx to calculate the thread settings required for your target load. |
| 25 | +* Execute performance run with various loads in order to achieve targeted NFR's. |
| 26 | + |
| 27 | +### Setup points for Execution |
| 28 | + |
| 29 | +* We need some jar files which needs to be added in lib folder of jmeter, PFA dependency links for your reference : |
| 30 | + |
| 31 | + * jmeter-plugins-manager-1.10.jar |
| 32 | + *<!-- https://mvnrepository.com/artifact/kg.apc/jmeter-plugins-manager --> |
| 33 | +<dependency> |
| 34 | + <groupId>kg.apc</groupId> |
| 35 | + <artifactId>jmeter-plugins-manager</artifactId> |
| 36 | + <version>1.10</version> |
| 37 | +</dependency> |
| 38 | + |
| 39 | + * jmeter-plugins-synthesis-2.2.jar |
| 40 | + * <!-- https://mvnrepository.com/artifact/kg.apc/jmeter-plugins-synthesis --> |
| 41 | +<dependency> |
| 42 | + <groupId>kg.apc</groupId> |
| 43 | + <artifactId>jmeter-plugins-synthesis</artifactId> |
| 44 | + <version>2.2</version> |
| 45 | +</dependency> |
| 46 | + |
| 47 | +* id-authentication-default.properties: Update the value for the properties according to the execution setup. |
| 48 | + *authrequest.received-time-allowed.seconds=86400 |
| 49 | + |
| 50 | +**Note - Before creating certificates we need to assign default role as AUTH_PARTNER in the keycloak for the environment we are using so that all new users with the same partner id which we will create will automatically have the desired role which it needs** |
| 51 | + |
| 52 | +**Note - Please make sure to create new keycloak user manually and assigning it to Partner Admin Access role** |
| 53 | + |
| 54 | +### Procedure to install and execute auth-demo-service in the local machine |
| 55 | + |
| 56 | +* The following link provides installation of auth-demo-service |
| 57 | + * https://github.com/mosip/mosip-functional-tests/blob/master/README.md |
| 58 | + |
| 59 | +* Navigate to the path where auth-demo-service has been installed and run following query for cellbox1 env. |
| 60 | + *java -jar -Dmosip.base.url=https://api-internal.cellbox1.mosip.net -Dserver.port=8082 -Dauth-token-generator.rest.clientId=mosip-resident-client -Dauth-token-generator.rest.secretKey=abc@123 -Dauth-token-generator.rest.appId=resident authentication-demo-service-1.2.1-develop-SNAPSHOT.jar |
| 61 | + |
| 62 | +### Execution points for eSignet Authentication API's |
| 63 | + |
| 64 | +*IDA_Test_Script.jmx |
| 65 | + |
| 66 | + |
| 67 | + * Create Identities in MOSIP Identity System (Setup) : This threadgroup contains the authorization api's for regproc and idrepo from which the auth token will be generated. There is set of 4 api's generate RID, generate UIN, add identity and add VID. From here we will get the VID which can be further used as individual id. These 4 api's are present in the loop controller where we can define the number of samples for creating identities in which "freshIdentityCreationCount" is used as a variable. |
| 68 | + |
| 69 | + * Third Party Certificates (Setup) : This threadgroup contains series of certificates upload to support the IDA execution. |
| 70 | + * Setup Ida Certificates to Utility: This transaction controller generates IDA certificates. |
| 71 | + * Creating Policy And Policy Group : This transaction controller creates and publish policy and policy group. The policy ID is the random number provided by user. The ID is not fetched from environment database. |
| 72 | + * Registering The Relying Partner : This transaction controller generates partner id for the relying partner. |
| 73 | + * Relying Party Keycloak User And Api Key Generation : This transaction controller generates keycloak user and API key for relying partner. |
| 74 | + * Create Misp Partner And Misp License Key : This transaction controller generates partner ID and license key for MISP partner. |
| 75 | + * Setup Device Partner : This transaction controller generates certificate for device partner. |
| 76 | + * Setup FTM Partner : This transaction controller generates certificate for FTM partner. |
| 77 | + |
| 78 | + * S01 Authentication with OTP (Preparation): This threadgroup creates testdata like signature and request body for the Auth Send OTP and Authentication with OTP request which expires after 24 hours. |
| 79 | + |
| 80 | + * S02 Authentication with Biometrics (Preparation): This threadgroup creates testdata like signature and request body for the Authentication with Biometric request which expires after 24 hours. |
| 81 | + |
| 82 | + * S03 Authentication with Demographics (Preparation): This threadgroup creates testdata like signature and request body for the Authentication with Demographics request which expires after 24 hours. |
| 83 | + |
| 84 | + * S01 Authentication with OTP (Execution) : |
| 85 | + * S01 T01 Auth Send OTP : This API endpoint sends OTP request. |
| 86 | + * S01 T02 Authentication with OTP : This API endpoint performs OTP authentication. |
| 87 | + |
| 88 | + * S02 Authentication with Biometrics (Execution): |
| 89 | + * S02 T01 Authentication with Biometrics: This API endpoint performs biometric authentication |
| 90 | + |
| 91 | + * S03 Authentication with Demographics (Execution): |
| 92 | + * S03 T01 Authentication with Demographics : This API endpoint performs the authentication with Demographics. |
| 93 | + |
| 94 | + * S04 EKYC with Biometrics (Execution): |
| 95 | + * S04 T01 EKYC with Biometrics: This API endpoint performs EKYC with biometric data. |
| 96 | + |
| 97 | +### Downloading Plugin manager jar file for the purpose installing other JMeter specific plugins |
| 98 | + |
| 99 | +* Download JMeter plugin manager from below url links. |
| 100 | + *https://jmeter-plugins.org/get/ |
| 101 | + |
| 102 | +* After downloading the jar file place it in below folder path. |
| 103 | + *lib/ext |
| 104 | + |
| 105 | +* Please refer to following link to download JMeter jars. |
| 106 | + https://mosip.atlassian.net/wiki/spaces/PT/pages/1227751491/Steps+to+set+up+the+local+system#PluginManager |
| 107 | + |
| 108 | +### Designing the workload model for performance test execution |
| 109 | + |
| 110 | +* The script is preconfigured for 100 tps within our test environement. Performance may vary based on hardware and infreastructure settings. |
| 111 | + |
| 112 | +* If you are testing for different tps or with different hardware settings, adjustment needs to made to thread group settings within the script. |
| 113 | + |
| 114 | +* `MOSIP_TPS_Thread_setting_calculator-packet_credential_processing.xlsx` applies Little's law to recommend required thread settings inputs. |
| 115 | + |
| 116 | +### Support files required for this test execution: |
| 117 | + |
| 118 | +1. add_identity_request_details.csv - This support file contains sample list of data that is used to create new identities. |
| 119 | +2. biometrics_data.txt - This support file contains sample excrypted bio data |
| 120 | +3. center_machine_id_values.csv - This support file contains center and machine ids available in master database. |
| 121 | +4. face_data.txt - This support file contains sample excrypted face data that is used prepare and verify bio-authentication. |
0 commit comments