Skip to content

Commit

Permalink
Adding Testng files
Browse files Browse the repository at this point in the history
  • Loading branch information
malshaniS committed Dec 6, 2024
1 parent 94b0949 commit fed14b8
Show file tree
Hide file tree
Showing 3 changed files with 131 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ class CeasingSecondaryUserConsentFlowTest extends AUTest {
void "CDS-644_Verify account is not listed under unavailable accounts once the legal entity is active by account owner"() {

//Active the sharing status
response = updateLegalEntityStatus(clientHeader, accountID, userId, legalEntityId, AUConstants.ACTIVE)
response = updateLegalEntityStatus(clientHeader, accountID, userId, legalEntityId.toLowerCase(), AUConstants.ACTIVE)
Assert.assertEquals(response.statusCode(), AUConstants.STATUS_CODE_200)

//Send Push Authorisation Request
Expand Down Expand Up @@ -163,7 +163,7 @@ class CeasingSecondaryUserConsentFlowTest extends AUTest {
void "CDS-646_Retrieve accounts after activating the data sharing for legal entity"() {

//Block the sharing status
response = updateLegalEntityStatus(clientHeader, accountID, userId, legalEntityId, AUConstants.ACTIVE)
response = updateLegalEntityStatus(clientHeader, accountID, userId, legalEntityId.toLowerCase(), AUConstants.ACTIVE)
Assert.assertEquals(response.statusCode(), AUConstants.STATUS_CODE_200)

//Account Retrieval
Expand All @@ -185,7 +185,7 @@ class CeasingSecondaryUserConsentFlowTest extends AUTest {
def updateResponse = updateSecondaryUserInstructionPermission(altAccountID, userId, AUConstants.ACTIVE)
Assert.assertEquals(updateResponse.statusCode(), AUConstants.OK)

response = updateLegalEntityStatus(clientHeader, altAccountID, userId, legalEntityId, AUConstants.ACTIVE)
response = updateLegalEntityStatus(clientHeader, altAccountID, userId, legalEntityId.toLowerCase(), AUConstants.ACTIVE)
Assert.assertEquals(response.statusCode(), AUConstants.STATUS_CODE_200)

//Send Push Authorisation Request
Expand Down Expand Up @@ -299,7 +299,7 @@ class CeasingSecondaryUserConsentFlowTest extends AUTest {
void "CDS-649_Verify account is listed under unavailable accounts once the legal entity is restricted in consent amendment flow"() {

//Active the sharing status for secondary account 1
response = updateLegalEntityStatus(clientHeader, accountID, userId, legalEntityId, AUConstants.ACTIVE)
response = updateLegalEntityStatus(clientHeader, accountID, userId, legalEntityId.toLowerCase(), AUConstants.ACTIVE)
Assert.assertEquals(response.statusCode(), AUConstants.STATUS_CODE_200)

//Send Push Authorisation Request
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,30 +19,62 @@

<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd" >
<suite name="Consumer Data Standards Test Suite">
<test name="Client Registration Tests" parallel="false" enabled="true">
<test name="Pre Test Execution Step - Create Key Manager" parallel="false" enabled="true">
<classes>
<class name="org.wso2.cds.preexecution.CreateCustomKeyManagerTest"/>
</classes>
</test>
<test name="Pre Test Execution Step - Publish APIs" parallel="false" enabled="true">
<classes>
<class name="org.wso2.cds.preexecution.PublishAndSubscribeApiTest"/>
</classes>
</test>
<test name="Pre Test Execution Step - Create Users" parallel="false" enabled="true">
<classes>
<class name="org.wso2.cds.preexecution.UserCreationTest"/>
</classes>
</test>
<test name="Client Registration Tests" parallel="false" enabled="true" preserve-order="false">
<classes>
<class name="org.wso2.cds.integration.test.clientRegistration.DynamicClientRegistrationCreateTest"/>
</classes>
</test>
<test name="Client Registration Retrieval Tests" parallel="false" enabled="true" preserve-order="false">
<classes>
<class name="org.wso2.cds.integration.test.clientRegistration.DynamicClientRegistrationRetrieveTest"/>
</classes>
</test>
<test name="Client Registration Update Tests" parallel="false" enabled="true" preserve-order="false">
<classes>
<class name="org.wso2.cds.integration.test.clientRegistration.DynamicClientRegistrationUpdateTest"/>
</classes>
</test>
<test name="Client Registration Delete Tests" parallel="false" enabled="true" preserve-order="false">
<classes>
<class name="org.wso2.cds.integration.test.clientRegistration.DynamicClientRegistrationDeleteTest"/>
<class name="org.wso2.cds.integration.test.clientRegistration.MultiTppDcrEndpointTests"/>
</classes>
</test>
<test name="Client Registration Prerequisite Step" parallel="false" enabled="true">
<test name="Client Registration Prerequisite Step" parallel="false" enabled="true" preserve-order="false">
<classes>
<class name="org.wso2.cds.integration.test.tpponboarding.CommonTppOnboardingStep"/>
</classes>
</test>
<test name="Accounts Integration Tests" parallel="false" enabled="true">
<test name="Accounts Integration Tests" parallel="false" enabled="true" preserve-order="false">
<classes>
<class name="org.wso2.cds.integration.test.accounts.AccountsRetrievalRequestHeaderValidationTest"/>
<class name="org.wso2.cds.integration.test.accounts.AccountsRetrievalRequestValidationTests"/>
<class name="org.wso2.cds.integration.test.accounts.AccountsIdPermanenceTest"/>
<class name="org.wso2.cds.integration.test.accounts.DuplicateCommonAuthIdTest"/>
</classes>
</test>
<test name="Scenarios for Multiple TPPs" parallel="false" enabled="false" preserve-order="false">
<classes>
<class name="org.wso2.cds.integration.test.clientRegistration.MultiTppDcrEndpointTests"/>
<class name="org.wso2.cds.integration.test.accounts.MultiTppConsentValidationTest"/>
<class name="org.wso2.cds.integration.test.tokenEndpoint.MultiTppTokenFlowValidationTests"/>
</classes>
</test>
<test name="Banking API Tests" parallel="false" enabled="true">
<test name="Banking API Tests" parallel="false" enabled="true" preserve-order="false">
<classes>
<class name="org.wso2.cds.integration.test.banking_products.ProductRetrievalHeaderValidationTest"/>
<class name="org.wso2.cds.integration.test.banking_products.ProductRetrievalValidationTest"/>
Expand All @@ -54,12 +86,12 @@
<class name="org.wso2.cds.integration.test.common_api.CustomerDetailsRetrievalTest"/>
</classes>
</test>
<test name="CDR Arrangement Management API Tests" parallel="false" enabled="true">
<test name="CDR Arrangement Management API Tests" parallel="false" enabled="false" preserve-order="false">
<classes>
<class name="org.wso2.cds.integration.test.cdr_arrangement.ConcurrentConsentTest"/>
</classes>
</test>
<test name="Admin API Tests" parallel="false" enabled="true">
<test name="Admin API Tests" parallel="false" enabled="false">
<classes>
<class name="org.wso2.cds.integration.test.admin_api.AdminApiValidationTests"/>

Expand Down Expand Up @@ -93,7 +125,6 @@
<test name="Token Validation Tests" parallel="false" enabled="true">
<classes>
<class name="org.wso2.cds.integration.test.tokenEndpoint.AccessTokenTest"/>
<class name="org.wso2.cds.integration.test.tokenEndpoint.MultiTppTokenFlowValidationTests"/>
</classes>
</test>
<!-- Since the Mock DCR Register is not working now we have to manually update the status.
Expand All @@ -107,6 +138,7 @@
<class name="org.wso2.cds.integration.test.metadata_update.MetaDataUpdateBatchTaskTests"/>
</classes>
</test>
<!--TODO: Enable the Config when required to Test Throttling-->
<test name="Throttling Policy Validation Tests" parallel="false" enabled="false">
<classes>
<class name="org.wso2.cds.integration.test.throttling.ThrottlingPolicyTest"/>
Expand Down Expand Up @@ -163,7 +195,8 @@
<class name="org.wso2.cds.keymanager.test.secondaryUser.SecondaryUserAmendmentFlow"/>
</classes>
</test>
<test name="Ceasing Secondary User" parallel="false" enabled="true">
<!--TODO: Enable after investigating issue: https://github.com/wso2/financial-services-accelerator/issues/215-->
<test name="Ceasing Secondary User" parallel="false" enabled="false">
<classes>
<class name="org.wso2.cds.keymanager.test.secondaryUser.CeasingSecondaryUserManagementTest"/>
<class name="org.wso2.cds.keymanager.test.secondaryUser.CeasingSecondaryUserConsentFlowTest"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,49 @@

<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd" >
<suite name="Consumer Data Standards Smoke Test Suite">
<test name="Client Registration Tests" parallel="false" enabled="true">
<test name="Pre Test Execution Step - Create Key Manager" parallel="false" enabled="true">
<method-selectors>
<method-selector>
<script language="beanshell">
<![CDATA[whatGroup = System.getProperty("groupToRun");
(groups.containsKey("SmokeTest") && groups.containsKey(whatGroup));
]]>
</script>
</method-selector>
</method-selectors>
<classes>
<class name="org.wso2.cds.preexecution.CreateCustomKeyManagerTest"/>
</classes>
</test>
<test name="Pre Test Execution Step - Publish APIs" parallel="false" enabled="true">
<method-selectors>
<method-selector>
<script language="beanshell">
<![CDATA[whatGroup = System.getProperty("groupToRun");
(groups.containsKey("SmokeTest") && groups.containsKey(whatGroup));
]]>
</script>
</method-selector>
</method-selectors>
<classes>
<class name="org.wso2.cds.preexecution.PublishAndSubscribeApiTest"/>
</classes>
</test>
<test name="Pre Test Execution Step - Create Users" parallel="false" enabled="true">
<method-selectors>
<method-selector>
<script language="beanshell">
<![CDATA[whatGroup = System.getProperty("groupToRun");
(groups.containsKey("SmokeTest") && groups.containsKey(whatGroup));
]]>
</script>
</method-selector>
</method-selectors>
<classes>
<class name="org.wso2.cds.preexecution.UserCreationTest"/>
</classes>
</test>
<test name="Client Registration Tests" parallel="false" enabled="true" preserve-order="false">
<method-selectors>
<method-selector>
<script language="beanshell">
Expand All @@ -31,8 +73,47 @@
</method-selectors>
<classes>
<class name="org.wso2.cds.integration.test.clientRegistration.DynamicClientRegistrationCreateTest"/>
</classes>
</test>
<test name="Client Registration Retrieval Tests" parallel="false" enabled="true" preserve-order="false">
<method-selectors>
<method-selector>
<script language="beanshell">
<![CDATA[whatGroup = System.getProperty("groupToRun");
(groups.containsKey("SmokeTest") && groups.containsKey(whatGroup));
]]>
</script>
</method-selector>
</method-selectors>
<classes>
<class name="org.wso2.cds.integration.test.clientRegistration.DynamicClientRegistrationRetrieveTest"/>
</classes>
</test>
<test name="Client Registration Update Tests" parallel="false" enabled="true" preserve-order="false">
<method-selectors>
<method-selector>
<script language="beanshell">
<![CDATA[whatGroup = System.getProperty("groupToRun");
(groups.containsKey("SmokeTest") && groups.containsKey(whatGroup));
]]>
</script>
</method-selector>
</method-selectors>
<classes>
<class name="org.wso2.cds.integration.test.clientRegistration.DynamicClientRegistrationUpdateTest"/>
</classes>
</test>
<test name="Client Registration Delete Tests" parallel="false" enabled="true" preserve-order="false">
<method-selectors>
<method-selector>
<script language="beanshell">
<![CDATA[whatGroup = System.getProperty("groupToRun");
(groups.containsKey("SmokeTest") && groups.containsKey(whatGroup));
]]>
</script>
</method-selector>
</method-selectors>
<classes>
<class name="org.wso2.cds.integration.test.clientRegistration.DynamicClientRegistrationDeleteTest"/>
</classes>
</test>
Expand Down Expand Up @@ -107,7 +188,7 @@
<class name="org.wso2.cds.integration.test.cdr_arrangement.ConcurrentConsentTest"/>
</classes>
</test>
<test name="Admin API Tests" parallel="false" enabled="true">
<test name="Admin API Tests" parallel="false" enabled="false">
<method-selectors>
<method-selector>
<script language="beanshell">
Expand Down Expand Up @@ -269,7 +350,8 @@
<class name="org.wso2.cds.keymanager.test.secondaryUser.SecondaryUserAmendmentFlow"/>
</classes>
</test>
<test name="Ceasing Secondary User" parallel="false" enabled="true">
<!--TODO: Enable after investigating issue: https://github.com/wso2/financial-services-accelerator/issues/215-->
<test name="Ceasing Secondary User" parallel="false" enabled="false">
<method-selectors>
<method-selector>
<script language="beanshell">
Expand Down

0 comments on commit fed14b8

Please sign in to comment.