Skip to content

Commit

Permalink
Merge pull request #162 from anup-nehe/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
aranaravi authored Aug 16, 2023
2 parents 5c157e7 + 2085300 commit 7d1344a
Show file tree
Hide file tree
Showing 13 changed files with 59 additions and 38 deletions.
14 changes: 14 additions & 0 deletions pmptest/resources/logs/AutomationLogs.log
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
2023-08-16 10:31:19,569 ERROR [main] i.m.t.p.u.BaseTestCaseFunc : Exception D:\GItAuto\pmp121\partner-management-portal\pmptest\target\classes\resources\config\application.properties (The system cannot find the path specified)
2023-08-16 10:31:19,572 ERROR [main] i.m.t.p.u.BaseTestCaseFunc : Exception D:\GItAuto\pmp121\partner-management-portal\pmptest\target\classes\resources\config\Kernel.properties (The system cannot find the path specified)
2023-08-16 10:31:19,573 ERROR [main] i.m.t.p.u.BaseTestCaseFunc : Exception D:\GItAuto\pmp121\partner-management-portal\pmptest\target\classes\resources\config\valueMapping.properties (The system cannot find the path specified)
2023-08-16 10:31:19,573 ERROR [main] i.m.t.p.u.BaseTestCaseFunc : Exception D:\GItAuto\pmp121\partner-management-portal\pmptest\target\classes\resources\config\bioValue.properties (The system cannot find the path specified)
2023-08-16 10:31:19,589 INFO [main] i.m.t.p.u.Commons : file locationD:\GItAuto\pmp121\partner-management-portal\pmptest\target\classes/resources/config/Kernel.properties
2023-08-16 10:31:19,590 ERROR [main] i.m.t.p.u.Commons : Exception D:\GItAuto\pmp121\partner-management-portal\pmptest\target\classes\resources\config\Kernel.properties (The system cannot find the path specified)
2023-08-16 10:31:19,591 INFO [main] i.m.t.p.u.Commons : adminportal_path from config manager::null
2023-08-16 10:31:19,591 INFO [main] i.m.t.p.u.Commons : apienvuser from config manager::null
2023-08-16 10:31:19,591 INFO [main] i.m.t.p.u.Commons : apiinternalendpoint from config manager::null
2023-08-16 10:31:19,592 INFO [main] i.m.t.p.u.Commons : keycloakendpoint from config manager::null
2023-08-16 10:31:19,592 INFO [main] i.m.t.p.u.Commons : keycloakendpoint from config manager::null
2023-08-16 10:31:19,592 INFO [main] i.m.t.p.u.Commons : adminportal_path from config manager::null
2023-08-16 10:31:19,592 INFO [main] i.m.t.p.u.Commons : apienvuser from config manager::null
2023-08-16 10:31:19,592 INFO [main] i.m.t.p.u.Commons : apiinternalendpoint from config manager::null
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,10 @@

import com.fasterxml.jackson.databind.ObjectMapper;

import io.mosip.testrig.pmpui.utility.BaseTestCaseFunc;

public class JsonPrecondtion {
private static final Logger JSONPRECONDATION_LOGGER = Logger.getLogger(JsonPrecondtion.class);

private static final org.slf4j.Logger JSONPRECONDATION_LOGGER= org.slf4j.LoggerFactory.getLogger(JsonPrecondtion.class);

public static String getValueFromJson(String jsonContent, String fieldMapper) {
try {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,15 @@

import org.apache.log4j.Logger;

import io.mosip.testrig.pmpui.authentication.fw.precon.JsonPrecondtion;
import io.restassured.RestAssured;
import io.restassured.config.HttpClientConfig;
import io.restassured.config.RestAssuredConfig;
import io.restassured.response.Response;

public class RestClient {

private static final Logger RESTCLIENT_LOGGER = Logger.getLogger(RestClient.class);
private static final org.slf4j.Logger RESTCLIENT_LOGGER= org.slf4j.LoggerFactory.getLogger(RestClient.class);
private static RestAssuredConfig config = RestAssured.config()
.httpClient(HttpClientConfig.httpClientConfig().setParam("http.connection.timeout", 500000)
.setParam("http.socket.timeout", 500000).setParam("http.connection-manager.timeout", 500000));
Expand Down Expand Up @@ -57,7 +58,7 @@ public static Response patchRequestWithCookieAndQueryParm(String url, HashMap<St
.contentType(contentHeader).cookie(cookieName, cookieValue).accept(acceptHeader).log().all().when()
.patch(url).then().log().all().extract().response();
RESTCLIENT_LOGGER.info(postResponse.asString());
RESTCLIENT_LOGGER.info(postResponse.time());
RESTCLIENT_LOGGER.info("postResponse.time ="+postResponse.time());
return postResponse;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

public class AdminTestUtil extends BaseTestCaseFunc {

private static final Logger logger = Logger.getLogger(AdminTestUtil.class);
private static final org.slf4j.Logger logger= org.slf4j.LoggerFactory.getLogger(RestClient.class);
public static String token;
public static String user;
public static String tokenRoleIdRepo = "idrepo";
Expand Down Expand Up @@ -151,7 +151,7 @@ else if (eachRequiredProp.equals("IDSchemaVersion")) {
requestJson.put("requesttime", generateCurrentUTCTimeStamp());
requestJson.put("version", "v1");

logger.info(requestJson);
logger.info("requestJson="+requestJson);
return requestJson.toString();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import io.restassured.response.Response;

public class ApplicationLibrary extends BaseTestCaseFunc {

private static final org.slf4j.Logger logger= org.slf4j.LoggerFactory.getLogger(ApplicationLibrary.class);
private static CommonLibrary commonLibrary = new CommonLibrary();


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import io.restassured.response.Response;

public class KernelAuthentication extends io.mosip.testrig.pmpui.utility.BaseTestCaseFunc {
private static final org.slf4j.Logger logger= org.slf4j.LoggerFactory.getLogger(KernelAuthentication.class);
private String authRequest="/config/Authorization/request.json";
private String authInternalRequest="config/Authorization/internalAuthRequest.json";
public String zonemapCookie = null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public class KeycloakUserManager extends BaseTestCaseFunc {
public static String moduleSpecificUser = null;
public static String passwordCred;

private static final Logger logger = Logger.getLogger(KeycloakUserManager.class);
private static final org.slf4j.Logger logger= org.slf4j.LoggerFactory.getLogger(KeycloakUserManager.class);

public static Properties propsKernel = getproperty(TestRunner.getResourcePath() + "/"+"config/Kernel.properties");

Expand Down Expand Up @@ -91,14 +91,14 @@ else if(needsToBeCreatedUser.equals("masterdata-220005")){
// Create user (requires manage-users role)
Response response = null;
response = usersRessource.create(user);
logger.info(response);
logger.info("response ="+response);
logger.info("Repsonse: %s %s%n"+ response.getStatus()+ response.getStatusInfo());
if (response.getStatus()==409) {
break;
}


logger.info(response.getLocation());
logger.info("response ="+response.getLocation());
String userId = CreatedResponseUtil.getCreatedId(response);
logger.info("User created with userId: %s%n"+ userId);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,12 @@
import com.amazonaws.services.s3.model.ObjectMetadata;
import com.amazonaws.services.s3.model.PutObjectRequest;

import io.mosip.testrig.pmpui.utility.BaseTestCaseFunc;

//import io.mosip.kernel.core.util.StringUtils;

public class S3Adapter {
private static final Logger logger = Logger.getLogger(S3Adapter.class);
private static final org.slf4j.Logger logger= org.slf4j.LoggerFactory.getLogger(S3Adapter.class);

private AmazonS3 connection = null;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public class BaseClass {
public static ExtentSparkReporter html;
public static ExtentReports extent;
public static ExtentTest test;

private static final org.slf4j.Logger logger= org.slf4j.LoggerFactory.getLogger(BaseClass.class);
public void setLangcode(String langcode) throws Exception {
this.langcode = Commons.getFieldData("langcode");
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@


public class Screenshot {
private static final org.slf4j.Logger logger= org.slf4j.LoggerFactory.getLogger(Screenshot.class);

public static String ClickScreenshot(WebDriver driver) throws IOException {
TakesScreenshot ss=(TakesScreenshot)driver;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@


public class TestRunner {
private static final Logger logger = Logger.getLogger(TestRunner.class);
private static final org.slf4j.Logger logger= org.slf4j.LoggerFactory.getLogger(TestRunner.class);
public static String jarUrl = TestRunner.class.getProtectionDomain().getCodeSource().getLocation().getPath();
static TestListenerAdapter tla = new TestListenerAdapter();

Expand Down
49 changes: 25 additions & 24 deletions pmptest/src/main/resources/config/Kernel.properties
Original file line number Diff line number Diff line change
Expand Up @@ -12,62 +12,62 @@ bulkUploadUrl=/v1/admin/bulkupload
#IDREPO
mosip_idrepo_app_id=idrepo
mosip_idrepo_client_id=mosip-idrepo-client
mosip_idrepo_client_secret=wJ21F8gXzdy2RM9q
mosip_idrepo_client_secret=EqQjQHyJFyIrM4ow
#IDREPO
mosip_idrepo_app_id=idrepo
mosip_idrepo_client_id=mosip-idrepo-client
mosip_idrepo_client_secret=wJ21F8gXzdy2RM9q
mosip_idrepo_client_secret=mosip-idrepo-client
keycloak-realm-id=mosip
keycloak-external-url=https://iam.dev3.mosip.net
keycloak-external-url=https://iam.dev.mosip.net
mosip_testrig_client_id=mosip-testrig-client
mosip_testrig_client_secret=aOCfcQC2dYm2Iotg
mosip_testrig_client_secret=XVEvFNPzTkvb4PwI
admin
mosip_admin_app_id=admin
admin_password=mosip123
admin_userName=auto12
mosip_admin_client_id=mosip-admin-client
mosip_admin_client_secret=7Vvj405Z5a35eAod
mosip_admin_client_secret=6TeZjfErY4qMUeKL
#admin
admin_zone_password=mosip123
admin_zone_userName=globaladmin
mosip_regclient_app_id=registrationclient
mosip_reg_client_id=mosip-reg-client
mosip_reg_client_secret=SGqovDBMh7McnAxw
mosip_reg_client_secret=3yd5YF6rgvCScifd
iam-users-to-create=auto12,globaladmin
#iam-users-to-create=111997,220005,111992
iam-users-password=mosip123,mosip123
roles.auto12=GLOBAL_ADMIN,ID_AUTHENTICATION,PARTNER_ADMIN,PMS_ADMIN,POLICYMANAGER,REGISTRATION_ADMIN,REGISTRATION_SUPERVISOR,ZONAL_ADMIN
roles.globaladmin=GLOBAL_ADMIN,REGISTRATION_ADMIN,uma_authorization,ZONAL_ADMIN,default-roles-mosip
partner_url=jdbc:postgresql://dev3.mosip.net:5432/mosip_ida
partner_url=jdbc:postgresql://dev.mosip.net:5432/mosip_ida
#----------------------------------Database properties----------------------------------------------------------#
postgresqlUser=postgresql
db-port=5432
db-server=dev3.mosip.net
db-server=dev.mosip.net
hibernate.connection.driver_class=org.postgresql.Driver
hibernate.connection.pool_size=1
hibernate.dialect=org.hibernate.dialect.PostgreSQLDialect
hibernate.show_sql=true
hibernate.current_session_context_class=thread
db-su-user=postgres
postgresql-password=rLqRHeY4C5
postgresql-password=2s5NfaKPkg
pms_db_schema=pms
km_db_schema=keymgr
master_db_schema=master
audit_db_schema=audit
ida_db_schema=ida
db-server=dev3.mosip.net
keycloak-external-url=https://iam.dev3.mosip.net
audit_url=jdbc:postgresql://dev3.mosip.net:5432/mosip_audit
db-server=dev.mosip.net
keycloak-external-url=https://iam.dev.mosip.net
audit_url=jdbc:postgresql://dev.mosip.net:5432/mosip_audit
driver_class=org.postgresql.Driver
pool_size=1
dialect=org.hibernate.dialect.PostgreSQLDialect
show_sql=true
current_session_context_class=thread
db-su-user=postgres
postgresql-password=rLqRHeY4C5
postgresql-password=2s5NfaKPkg
postgresqlUser=postgresql
db-port=5432
db-server=dev3.mosip.net
db-server=dev.mosip.net


s3-user-key=minioadmin
Expand All @@ -77,20 +77,20 @@ s3-account=uiautomation
s3-region=null
reportExpirationInDays=3
# supported values yes or no
push-reports-to-s3=yes
push-reports-to-s3=no
enableDebug=no
# supported values are 1 to 8
threadCount=1
# supported values are 0 ,1, 2 based on number of env languages
langselect=0
#----------------------------------AuthDemoService Host properties----------------------------------------------------------#
#To run locally
#authDemoServiceBaseURL=http://localhost
#authDemoServicePort=8082
authDemoServiceBaseURL=http://localhost
authDemoServicePort=8082

#To run in Docker
authDemoServiceBaseURL=http://authdemo.apitestrig
authDemoServicePort=80
#authDemoServiceBaseURL=http://authdemo.apitestrig
#authDemoServicePort=80


#----------------------------------IdP properties----------------------------------------------------------#
Expand All @@ -103,11 +103,12 @@ tokenEndpoint=/v1/esignet/oauth/token
validateBindingEndpoint=esignet-binding

#To run in Docker
authCertsPath=/home/mosip/authcerts
#authCertsPath=/home/mosip/authcerts

#To run locally
#authCertsPath=
authCertsPath=

PmpPortalPath=https://pmp.dev3.mosip.net/
apiEnvUser=api-internal.dev3
apiInternalEndPoint=https://api-internal.dev3.mosip.net
PmpPortalPath=https://pmp.dev.mosip.net/
apiEnvUser=api-internal.dev
#ENDPOINT replaced by apiInternalEndPoint
apiInternalEndPoint=https://api-internal.dev.mosip.net
2 changes: 1 addition & 1 deletion pmptest/src/main/resources/logback.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<configuration>

<property name="LOG_PATTERN" value="%d %p [%t] %c{5} : %m%n" />
<property name="APP_LOG_ROOT" value="resources/logs"/>
<property name="APP_LOG_ROOT" value="logs"/>

<appender name="applicationLogAutomation" class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>${APP_LOG_ROOT}/AutomationLogs.log</file>
Expand Down

0 comments on commit 7d1344a

Please sign in to comment.