Skip to content

Commit

Permalink
Merge pull request #671 from pg-techno123/develop
Browse files Browse the repository at this point in the history
MOSIP-36029
  • Loading branch information
mohanachandran-s authored Nov 7, 2024
2 parents a3913da + c8023b5 commit 379c003
Show file tree
Hide file tree
Showing 28 changed files with 1,542 additions and 1,509 deletions.
4 changes: 2 additions & 2 deletions mosip-acceptance-tests/ivv-core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@
<parent>
<groupId>io.mosip.testrig.dslrig.ivv</groupId>
<artifactId>dslrig-ivv-parent</artifactId>
<version>1.2.1-java21-SNAPSHOT</version>
<version>1.2.1-SNAPSHOT</version>
</parent>

<modelVersion>4.0.0</modelVersion>
<groupId>io.mosip.testrig.dslrig.ivv.core</groupId>
<artifactId>dslrig-ivv-core</artifactId>
<version>1.2.1-java21-SNAPSHOT</version>
<version>1.2.1-SNAPSHOT</version>

<properties>
<maven.sonar.plugin.version>3.7.0.1746</maven.sonar.plugin.version>
Expand Down
8 changes: 4 additions & 4 deletions mosip-acceptance-tests/ivv-dg/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
<parent>
<groupId>io.mosip.testrig.dslrig.ivv</groupId>
<artifactId>dslrig-ivv-parent</artifactId>
<version>1.2.1-java21-SNAPSHOT</version>
<version>1.2.1-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<version>1.2.1-java21-SNAPSHOT</version>
<version>1.2.1-SNAPSHOT</version>
<groupId>io.mosip.testrig.dslrig.ivv.dg</groupId>
<artifactId>dslrig-ivv-dg</artifactId>

Expand All @@ -20,12 +20,12 @@
<dependency>
<groupId>io.mosip.testrig.dslrig.ivv.core</groupId>
<artifactId>dslrig-ivv-core</artifactId>
<version>1.2.1-java21-SNAPSHOT</version>
<version>1.2.1-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>io.mosip.testrig.dslrig.ivv.parser</groupId>
<artifactId>dslrig-ivv-parser</artifactId>
<version>1.2.1-java21-SNAPSHOT</version>
<version>1.2.1-SNAPSHOT</version>
</dependency>
</dependencies>

Expand Down
95 changes: 45 additions & 50 deletions mosip-acceptance-tests/ivv-orchestrator/pom.xml
Original file line number Diff line number Diff line change
@@ -1,15 +1,19 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<parent>
<groupId>io.mosip.testrig.dslrig.ivv</groupId>
<artifactId>dslrig-ivv-parent</artifactId>
<version>1.2.1-java21-SNAPSHOT</version>
<version>1.2.1-SNAPSHOT</version>
</parent>

<groupId>io.mosip.testrig.dslrig.ivv.orchestrator</groupId>
<artifactId>dslrig-ivv-orchestrator</artifactId>
<name>mosip-dsl-test</name>
<version>1.2.1-java21-SNAPSHOT</version>
<version>1.2.1-SNAPSHOT</version>

<properties>
<suiteXmlFile>testng.xml</suiteXmlFile>
<maven.sonar.plugin.version>3.7.0.1746</maven.sonar.plugin.version>
Expand All @@ -30,14 +34,14 @@
</goals>
<configuration>
<target>
<!-- Create a shell script to run the JAR file
with executable permission -->
<chmod file="${project.build.directory}/*.jar" perm="ugo+rx" />
<chmod file="${project.build.directory}/*.jar"
perm="ugo+rx" />
</target>
</configuration>
</execution>
</executions>
</plugin>

<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.0</version>
Expand All @@ -47,6 +51,7 @@
<argLine>-Dfile.encoding=UTF-8</argLine>
</configuration>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
Expand All @@ -57,21 +62,15 @@
<goal>shade</goal>
</goals>
<configuration>
<finalName>
dslrig-ivv-orchestrator-1.2.1-java21-SNAPSHOT-jar-with-dependencies</finalName>
<finalName>dslrig-ivv-orchestrator-1.2.1-SNAPSHOT-jar-with-dependencies</finalName>
<transformers>
<!-- need this to merge the services files
properly -->
<transformer implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer" />
<!-- add Main-Class to manifest file -->
<transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
<mainClass>
io.mosip.testrig.dslrig.ivv.orchestrator.TestRunner</mainClass>
<transformer
implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer" />
<transformer
implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
<mainClass>io.mosip.testrig.dslrig.ivv.orchestrator.TestRunner</mainClass>
</transformer>
</transformers>
<!-- add this to prevent some security issues when
merging everything
together -->
<filters>
<filter>
<artifact>*:*</artifact>
Expand All @@ -90,28 +89,30 @@
</build>

<dependencies>
<!-- https://mvnrepository.com/artifact/org.apache.commons/commons-lang3 -->
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
</dependency>
<!-- core dependencies -->

<dependency>
<groupId>io.mosip.testrig.dslrig.ivv.core</groupId>
<artifactId>dslrig-ivv-core</artifactId>
<version>1.2.1-java21-SNAPSHOT</version>
<version>1.2.1-SNAPSHOT</version>
</dependency>

<dependency>
<groupId>io.mosip.testrig.dslrig.ivv.dg</groupId>
<artifactId>dslrig-ivv-dg</artifactId>
<version>1.2.1-java21-SNAPSHOT</version>
<version>1.2.1-SNAPSHOT</version>
</dependency>

<dependency>
<groupId>com.aventstack</groupId>
<artifactId>extentreports</artifactId>
<version>3.0.7</version>
<scope>compile</scope>
</dependency>

<dependency>
<groupId>io.mosip.testrig.apirig.apitest.commons</groupId>
<artifactId>apitest-commons</artifactId>
Expand All @@ -127,31 +128,37 @@
</exclusion>
</exclusions>
</dependency>

<dependency>
<groupId>io.mosip.authentication</groupId>
<artifactId>apitest-auth</artifactId>
<groupId>io.mosip.idrepo</groupId>
<artifactId>apitest-idrepo</artifactId>
<version>1.2.1-SNAPSHOT</version>
</dependency>
<dependency>

<dependency>
<groupId>io.mosip.esignet</groupId>
<artifactId>apitest-esignet</artifactId>
<version>1.2.1-SNAPSHOT</version>
</dependency>

<dependency>
<groupId>io.mosip.masterdata</groupId>
<artifactId>apitest-masterdata</artifactId>
<groupId>io.mosip.authentication</groupId>
<artifactId>apitest-auth</artifactId>
<version>1.2.1-SNAPSHOT</version>
</dependency>

<dependency>
<groupId>io.mosip.idrepo</groupId>
<artifactId>apitest-idrepo</artifactId>
<groupId>io.mosip.masterdata</groupId>
<artifactId>apitest-masterdata</artifactId>
<version>1.2.1-SNAPSHOT</version>
</dependency>

<dependency>
<groupId>io.mosip.resident</groupId>
<artifactId>apitest-resident</artifactId>
<version>1.2.1-SNAPSHOT</version>
</dependency>

<dependency>
<groupId>com.slack.api</groupId>
<artifactId>slack-api-client</artifactId>
Expand All @@ -163,20 +170,23 @@
</exclusion>
</exclusions>
</dependency>

<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
</dependency>

<dependency>
<groupId>io.mosip.kernel</groupId>
<artifactId>kernel-biometrics-api</artifactId>
<version>1.2.1-SNAPSHOT</version>
</dependency>
<!-- https://mvnrepository.com/artifact/javax.cache/cache-api -->

<dependency>
<groupId>javax.cache</groupId>
<artifactId>cache-api</artifactId>
</dependency>

<dependency>
<groupId>org.ehcache</groupId>
<artifactId>jcache</artifactId>
Expand All @@ -188,10 +198,12 @@
</exclusion>
</exclusions>
</dependency>

<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-core</artifactId>
</dependency>

<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-batch</artifactId>
Expand All @@ -202,10 +214,12 @@
</exclusion>
</exclusions>
</dependency>

<dependency>
<groupId>org.hibernate.validator</groupId>
<artifactId>hibernate-validator</artifactId>
</dependency>

<dependency>
<groupId>com.jayway.jsonpath</groupId>
<artifactId>json-path</artifactId>
Expand Down Expand Up @@ -234,30 +248,12 @@
<profile>
<id>sonar</id>
<properties>

<!-- Spring version -->
<spring.version>5.0.6.RELEASE</spring.version>

<spring.boot.version>2.0.2.RELEASE</spring.boot.version>
<spring.data.jpa.version>2.0.7.RELEASE</spring.data.jpa.version>
<spring.security.test.version>5.0.5.RELEASE</spring.security.test.version>
<spring-cloud-config.version>2.0.0.RELEASE</spring-cloud-config.version>

<swagger.core.version>2.0.7</swagger.core.version>
<swagger.annotations.version>1.5.20</swagger.annotations.version>
<springfox.version>2.9.2</springfox.version>

<vertx.version>3.6.2</vertx.version>
<vertx.health.check.version>3.7.0</vertx.health.check.version>

<sonar.sources>.</sonar.sources>
<sonar.inclusions>src/main/java/**,src/main/resources/**</sonar.inclusions>
<sonar.exclusions>${sonar.coverage.exclusions}</sonar.exclusions>
<sonar.host.url>https://sonarcloud.io</sonar.host.url>
<spring-cloud-config.version>2.0.1.RELEASE</spring-cloud-config.version>
</properties>
<activation>
<activeByDefault>false</activeByDefault>
</activation>
<build>
<plugins>
<plugin>
Expand All @@ -266,7 +262,6 @@
<version>${maven.sonar.plugin.version}</version>
<executions>
<execution>
<phase>verify</phase>
<goals>
<goal>sonar</goal>
</goals>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,27 +29,25 @@ public class GetResidentData extends BaseTestCaseUtil implements StepInterface {
@Override
public void run() throws RigInternalError {

int nofResident = 1;
String ageCategory = "";
Boolean bSkipGuardian = false;
String missFields = null;
String[] bioFlag = null;
HashMap<String, String> genderAndBioFlag = new HashMap<String, String>();
if (!step.getParameters().isEmpty() && step.getParameters().size() > 3) {
nofResident = Integer.parseInt(step.getParameters().get(0));
ageCategory = step.getParameters().get(1);
bSkipGuardian = Boolean.parseBoolean(step.getParameters().get(2));
if (!step.getParameters().isEmpty() && step.getParameters().size() >= 3) {
ageCategory = step.getParameters().get(0);
bSkipGuardian = Boolean.parseBoolean(step.getParameters().get(1));

if (step.getParameters().get(3).contains("@@")) {
bioFlag = step.getParameters().get(3).split("@@");
if (step.getParameters().get(2).contains("@@")) {
bioFlag = step.getParameters().get(2).split("@@");
genderAndBioFlag.put("Gender", bioFlag[0]);
genderAndBioFlag.put("Iris", bioFlag[1]);
genderAndBioFlag.put("Finger", bioFlag[2]);
genderAndBioFlag.put("Face", bioFlag[3]);

} else {

genderAndBioFlag.put("Gender", step.getParameters().get(3));
genderAndBioFlag.put("Gender", step.getParameters().get(2));
genderAndBioFlag.put("Iris", "true");
genderAndBioFlag.put("Finger", "true");
genderAndBioFlag.put("Face", "true");
Expand All @@ -58,8 +56,8 @@ public void run() throws RigInternalError {

// Get Miss attrobutes list

if (step.getParameters().size() > 4)
missFields = step.getParameters().get(4).replaceAll("@@", ",");
if (step.getParameters().size() > 3)
missFields = step.getParameters().get(3).replaceAll("@@", ",");

} else {
logger.warn("Input parameter missing [nofResident/bAdult/bSkipGuardian/gender]");
Expand All @@ -69,7 +67,7 @@ public void run() throws RigInternalError {

// Generate Resident for all ages
cleanData();
Response response = packetUtility.generateResident(nofResident, ageCategory, bSkipGuardian, missFields,
Response response = packetUtility.generateResident(ageCategory, bSkipGuardian, missFields,
genderAndBioFlag, step);
JSONObject jsonObject = new JSONObject(response.getBody().asString());
JSONArray resp = new JSONObject(response.getBody().asString()).getJSONArray("response");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -173,10 +173,10 @@ public List<String> generateResidents(int n, Boolean bAdult, Boolean bSkipGuardi

}

public Response generateResident(int n, String ageCategory, Boolean bSkipGuardian, String missFields,
public Response generateResident(String ageCategory, Boolean bSkipGuardian, String missFields,
HashMap<String, String> genderAndBioFlag, Scenario.Step step) throws RigInternalError {

String url = baseUrl + props.getProperty("getResidentUrl") + n;
String url = baseUrl + props.getProperty("getResidentUrl");
JSONObject jsonwrapper = new JSONObject();
JSONObject jsonReq = new JSONObject();
JSONObject residentAttrib = new JSONObject();
Expand Down
Loading

0 comments on commit 379c003

Please sign in to comment.