Skip to content

Commit

Permalink
Merge pull request #439 from nandhu-kumar/develop
Browse files Browse the repository at this point in the history
MOSIP-35770 | Test rig should be able to skip the test cases which are known failures due to known automation and server side issue(s)
  • Loading branch information
ckm007 authored Sep 19, 2024
2 parents ad4e4d2 + 9b3f094 commit 17d34f0
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
import io.mosip.testrig.apirig.utils.MispPartnerAndLicenseKeyGeneration;
import io.mosip.testrig.apirig.utils.OutputValidationUtil;
import io.mosip.testrig.apirig.utils.PartnerRegistration;
import io.mosip.testrig.apirig.utils.SkipTestCaseHandler;

/**
* Class to initiate mosip api test execution
Expand Down Expand Up @@ -71,6 +72,7 @@ public static void main(String[] arg) {
}
ConfigManager.init();
BaseTestCase.suiteSetup();
SkipTestCaseHandler.loadTestcaseToBeSkippedList("testCaseSkippedList.txt");
setLogLevels();

// For now we are not doing health check for qa-115.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,6 @@
public class MimotoUtil extends AdminTestUtil {

private static final Logger logger = Logger.getLogger(MimotoUtil.class);
public static final String SEND_OTP_ENDPOINT = "mimoto/req/";
public static final String MIMOTO_CREDENTIAL_STATUS = "Mimoto_CredentialsStatus_";
public static final String OTP_FEATURE_NOT_SUPPORTED = "OTP feature not supported. Hence skipping the testcase";


private static String otpEnabled = "true";

public static String isOTPEnabled() {
Expand Down Expand Up @@ -41,10 +36,14 @@ public static TestCaseDTO changeContextURLByFlag(TestCaseDTO testCaseDTO) {

public static String isTestCaseValidForExecution(TestCaseDTO testCaseDTO) {
String testCaseName = testCaseDTO.getTestCaseName();
if (isOTPEnabled().equals("false") && (testCaseDTO.getEndPoint().contains(SEND_OTP_ENDPOINT)
|| testCaseDTO.getInput().contains(SEND_OTP_ENDPOINT)
|| testCaseName.startsWith(MIMOTO_CREDENTIAL_STATUS) || testCaseName.contains("_vid"))) {
throw new SkipException(OTP_FEATURE_NOT_SUPPORTED);
if (isOTPEnabled().equals("false") && (testCaseDTO.getEndPoint().contains(GlobalConstants.SEND_OTP_ENDPOINT)
|| testCaseDTO.getInput().contains(GlobalConstants.SEND_OTP_ENDPOINT)
|| testCaseName.startsWith(GlobalConstants.MIMOTO_CREDENTIAL_STATUS) || testCaseName.contains("_vid"))) {
throw new SkipException(GlobalConstants.OTP_FEATURE_NOT_SUPPORTED);
}

if (SkipTestCaseHandler.isTestCaseInSkippedList(testCaseName)) {
throw new SkipException(GlobalConstants.KNOWN_ISSUES);
}
return testCaseName;
}
Expand Down
1 change: 1 addition & 0 deletions apitest/src/main/resources/config/Kernel.properties
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,7 @@ usePreConfiguredOtp=true
eSignetDeployed=yes
partnerUrlSuffix=oYf63Lax0DY2QkYMRHnrmDqhmO3RMWQagwm0ftgLlkuin1KOND/666/576732
reportIgnoredTestCases=no
reportKnownIssueTestCases=no
servicesNotDeployed=
esignetMockBaseURL=esignet-insurance.
sunBirdBaseURL=https://registry.dev1.mosip.net
Expand Down
2 changes: 2 additions & 0 deletions apitest/src/main/resources/testCaseSkippedList.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
##### JIRA number;testcase
#MOSIP-12456------Mimoto_AddIdentity_Binding_smoke_Pos

0 comments on commit 17d34f0

Please sign in to comment.