Uploaded image for project: 'Document Management System'
  1. Document Management System
  2. DMS-1900

DMS API Testing : Unite test cases changes as per new changes

    Details

    • Type: Maintenance
    • Status: Done
    • Priority: Medium
    • Resolution: Done
    • Affects Version/s: None
    • Fix Version/s: None
    • Labels:
      None

      Description

      Many structural changes are done into DMS like Connection Pooling , Cache , Performance changes.

      We need to go through unit test cases which we written previously , needs to modify unit test cases as per new changes.

        Attachments

          Activity

          sonali.farakate Sonali Farakate (Inactive) logged work - 15/Sep/19 09:13 PM
          • Time Spent:
            6.5h
             
            • Unit testing verification
            • changes in unit test cases as per new code changes
          rohan.khandave Rohan J Khandave (Inactive) created issue -
          rohan.khandave Rohan J Khandave (Inactive) made changes -
          Field Original Value New Value
          Epic Link DMS-2 [ 69268 ]
          akash.thakur Akash Thakur (Inactive) logged work - 16/Sep/19 01:16 AM
          • Time Spent:
            3.25h
             

            unit test corrections.

            integration test corrections.

          akash.thakur Akash Thakur (Inactive) made changes -
          Remaining Estimate 0h [ 0 ]
          Time Spent 3.25h [ 11700 ]
          Worklog Id 200280 [ 200280 ]
          Hide
          akash.thakur Akash Thakur (Inactive) added a comment -

          Hi Rohan J Khandave,

          As per our discussions, I have corrected the unit & integration test but was not able to test this test cases due to object disposed error for _context please request you to look into this & let us know to continue the testing.

           

          Thanks,

          Akash Thakur

          Sonali Farakate Ramya Tantry Raj Hawaldar Ganesh Sadawarte Harshveer Singh

          Show
          akash.thakur Akash Thakur (Inactive) added a comment - Hi Rohan J Khandave , As per our discussions, I have corrected the unit & integration test but was not able to test this test cases due to object disposed error for _context please request you to look into this & let us know to continue the testing.   Thanks, Akash Thakur Sonali Farakate Ramya Tantry Raj Hawaldar Ganesh Sadawarte Harshveer Singh
          rohan.khandave Rohan J Khandave (Inactive) made changes -
          Sprint DMS - Gap Fall & Win Sprint 4 [ 179 ]
          Remaining Estimate 0h [ 0 ] 64h [ 230400 ]
          Original Estimate 64h [ 230400 ]
          Show
          harshveer.singh Harshveer Singh (Inactive) added a comment - Akash Thakur , Rohan J Khandave   Sonali Farakate   Ramya Tantry   Raj Hawaldar   Ganesh Sadawarte   Harshveer Singh  refer to this PR for fix for _context disposing issue.  https://github.com/cbdr/DMS/pull/886
          ramya.tantry Ramya Tantry (Inactive) logged work - 16/Sep/19 05:49 AM
          • Time Spent:
            6h
             

            Discussion with Rohan and Sonali

            code changes

            Merging Harshveer's changes and testing

            Provisioning API changes

          ramya.tantry Ramya Tantry (Inactive) made changes -
          Remaining Estimate 64h [ 230400 ] 58h [ 208800 ]
          Time Spent 3.25h [ 11700 ] 9.25h [ 33300 ]
          Worklog Id 200336 [ 200336 ]
          rohan.khandave Rohan J Khandave (Inactive) logged work - 16/Sep/19 06:21 AM
          • Time Spent:
            4.5h
             

            Analysis
            Debugging
            Code Changes
            Testing

          rohan.khandave Rohan J Khandave (Inactive) made changes -
          Remaining Estimate 58h [ 208800 ] 53.5h [ 192600 ]
          Time Spent 9.25h [ 33300 ] 13.75h [ 49500 ]
          Worklog Id 200344 [ 200344 ]
          Ganesh.sadawarte Ganesh Sadawarte (Inactive) made changes -
          Remaining Estimate 53.5h [ 192600 ] 50.5h [ 181800 ]
          Time Spent 13.75h [ 49500 ] 16.75h [ 60300 ]
          Worklog Id 200346 [ 200346 ]
          Ganesh.sadawarte Ganesh Sadawarte (Inactive) logged work - 16/Sep/19 06:22 PM
          • Time Spent:
            3h
             
            • xunit integration & unit test.
          sonali.farakate Sonali Farakate (Inactive) made changes -
          Remaining Estimate 50.5h [ 181800 ] 44h [ 158400 ]
          Time Spent 16.75h [ 60300 ] 23.25h [ 83700 ]
          Worklog Id 200462 [ 200462 ]
          rohan.khandave Rohan J Khandave (Inactive) made changes -
          Status To Do [ 10000 ] In Progress [ 3 ]
          rohan.khandave Rohan J Khandave (Inactive) made changes -
          Assignee Samir [ samir ] Rohan J Khandave [ rohan.khandave ]
          sonali.farakate Sonali Farakate (Inactive) logged work - 16/Sep/19 09:59 PM
          • Time Spent:
            5.5h
             
            • Code changes
            • Discussion
          Hide
          harshveer.singh Harshveer Singh (Inactive) added a comment -

          https://github.com/cbdr/DMS/pull/886

          Concern: Dependencies resolved by DependencyResolverHelpercs are disposing as soon as they are created.

          Cause: DependencyResolverHelpercs.GetService method is creating new Scope for each service it needs to resolve, getting dependency from that scope, and immediately disposing newly created scope, because of which all services resolved within that scope are getting disposed.

          Correction: Do not create new scope for each dependency needed, also do not dispose scope immediately.

          Show
          harshveer.singh Harshveer Singh (Inactive) added a comment - https://github.com/cbdr/DMS/pull/886 Concern: Dependencies resolved by DependencyResolverHelpercs are disposing as soon as they are created. Cause: DependencyResolverHelpercs.GetService method is creating new Scope for each service it needs to resolve, getting dependency from that scope, and immediately disposing newly created scope, because of which all services resolved within that scope are getting disposed. Correction: Do not create new scope for each dependency needed, also do not dispose scope immediately.
          Hide
          sonali.farakate Sonali Farakate (Inactive) added a comment - - edited

          Changes done in DMSUserControllerTest.cs

          • public void Post_ShouldLogoutUser() : 
            parameter passed to function LogoutUser() was string, updated this to UserDto object.
            Assert was not working for this hence changed.
          • public void Post_ShouldNotLogoutUser() : 
            parameter passed to function LogoutUser() was string, updated this to UserDto object.
            Assert was not working for this hence changed.
          • Post_ShouldRetrieve_FirstNameForActualUser() : 
            Assert statement was giving warning hence changed.
          • NOTE : Remaining hard coded values(username, password and usertypeID) updated as per pre-prod database.

          CC : Rohan J Khandave

          Show
          sonali.farakate Sonali Farakate (Inactive) added a comment - - edited Changes done in DMSUserControllerTest.cs public void Post_ShouldLogoutUser() :  parameter passed to function LogoutUser() was string, updated this to UserDto object. Assert was not working for this hence changed. public void Post_ShouldNotLogoutUser() :  parameter passed to function LogoutUser() was string, updated this to UserDto object. Assert was not working for this hence changed. Post_ShouldRetrieve_FirstNameForActualUser() :  Assert statement was giving warning hence changed. NOTE : Remaining hard coded values(username, password and usertypeID) updated as per pre-prod database. CC : Rohan J Khandave
          Hide
          akash.thakur Akash Thakur (Inactive) added a comment - - edited

          Changes done in GenerateDocumentControllerTest.cs (all test run successfully)

          • Moved API URL to constants avoided duplicate string everywhere.
          • Resolved correct dependencies for GenerateDocumentController & removed unused services.
          • Removed outdated hardcoded Authorization header values replaced to constants.
          • NOTE: Remaining hardcoded values(Person identity, source product, template ID) updated as per pre-prod database.

          CC : Rohan J Khandave Harshveer Singh Samir

          Show
          akash.thakur Akash Thakur (Inactive) added a comment - - edited Changes done in GenerateDocumentControllerTest.cs (all test run successfully) Moved API URL to constants avoided duplicate string everywhere. Resolved correct dependencies for GenerateDocumentController & removed unused services. Removed outdated hardcoded Authorization header values replaced to constants. NOTE: Remaining hardcoded values(Person identity, source product, template ID) updated as per pre-prod database. CC :  Rohan J Khandave Harshveer Singh Samir
          akash.thakur Akash Thakur (Inactive) logged work - 17/Sep/19 01:27 AM
          • Time Spent:
            2.5h
             

            test case corrections

          akash.thakur Akash Thakur (Inactive) made changes -
          Attachment GenerateDocumentControllerTest.png [ 119801 ]
          akash.thakur Akash Thakur (Inactive) made changes -
          Remaining Estimate 44h [ 158400 ] 41.5h [ 149400 ]
          Time Spent 23.25h [ 83700 ] 25.75h [ 92700 ]
          Worklog Id 200600 [ 200600 ]
          Hide
          Raj.Hawaldar Raj Hawaldar (Inactive) added a comment -

          Changes completed in CandidateProfileControllerTest.

          • Removed outdated data from TestSuite.
          • Hardcoded values updated as per the Pre-Production Database.
          • Parameters added to getDocumentDto(bool flag).
          • StaticFunctions.GetDBContext() is used.

          All test are running for CandidateProfileController.
          Regards,
          Raj

          Show
          Raj.Hawaldar Raj Hawaldar (Inactive) added a comment - Changes completed in CandidateProfileControllerTest. Removed outdated data from TestSuite. Hardcoded values updated as per the Pre-Production Database. Parameters added to getDocumentDto(bool flag). StaticFunctions.GetDBContext() is used. All test are running for CandidateProfileController. Regards, Raj
          Hide
          sonali.farakate Sonali Farakate (Inactive) added a comment -
          • Changes done in CandidateProfileTests.cs
            Mock data was missing for document, documentTemplate, person, users. So added mock data for these tables.
            Following mock routines added :
          1. GetPersonIdFromEmail
          2. GetTemplateFieldDetails
          • Changes done in  ProvisioningAPILogicTests
            Changes in unit test parameters.

          Thanks,
          Sonali Farakate

          Show
          sonali.farakate Sonali Farakate (Inactive) added a comment - Changes done in CandidateProfileTests.cs Mock data was missing for document, documentTemplate, person, users. So added mock data for these tables. Following mock routines added : GetPersonIdFromEmail GetTemplateFieldDetails Changes done in  ProvisioningAPILogicTests Changes in unit test parameters. Thanks, Sonali Farakate
          ramya.tantry Ramya Tantry (Inactive) logged work - 17/Sep/19 04:14 AM
          • Time Spent:
            6h
             

            Code changes

            Testing

          Hide
          ramya.tantry Ramya Tantry (Inactive) added a comment -

          Changes done in ProvisioningApiTest

          1. Authentication changes for all test cases written
          2. Removed comments 
          3. Removed unnecessary usings
          4. Removed unnecessary functions created.
          5. Created different input objects for Insert update testcases.

          All 18 test cases are running for ProvisioningApiTest

          CC: Rohan J Khandave

          Show
          ramya.tantry Ramya Tantry (Inactive) added a comment - Changes done in ProvisioningApiTest Authentication changes for all test cases written Removed comments  Removed unnecessary usings Removed unnecessary functions created. Created different input objects for Insert update testcases. All 18 test cases are running for ProvisioningApiTest CC: Rohan J Khandave
          ramya.tantry Ramya Tantry (Inactive) made changes -
          Remaining Estimate 41.5h [ 149400 ] 35.5h [ 127800 ]
          Time Spent 25.75h [ 92700 ] 31.75h [ 114300 ]
          Worklog Id 200656 [ 200656 ]
          rohan.khandave Rohan J Khandave (Inactive) made changes -
          Status In Progress [ 3 ] In Progress [ 3 ]
          ramya.tantry Ramya Tantry (Inactive) logged work - 17/Sep/19 05:35 AM
          • Time Spent:
            1h
             

            Discussion with Rohan and Sonali

            Code changes for provisioning API's

          ramya.tantry Ramya Tantry (Inactive) made changes -
          Remaining Estimate 35.5h [ 127800 ] 34.5h [ 124200 ]
          Time Spent 31.75h [ 114300 ] 32.75h [ 117900 ]
          Worklog Id 200669 [ 200669 ]
          akash.thakur Akash Thakur (Inactive) logged work - 17/Sep/19 06:57 AM
          • Time Spent:
            3h
             

            test all test cases and corrections.

            randomizer implementation.

          akash.thakur Akash Thakur (Inactive) made changes -
          Remaining Estimate 34.5h [ 124200 ] 31.5h [ 113400 ]
          Time Spent 32.75h [ 117900 ] 35.75h [ 128700 ]
          Worklog Id 200682 [ 200682 ]
          rohan.khandave Rohan J Khandave (Inactive) logged work - 17/Sep/19 07:10 AM
          • Time Spent:
            2h
             

            resolve unit test case issues

          rohan.khandave Rohan J Khandave (Inactive) made changes -
          Remaining Estimate 31.5h [ 113400 ] 29.5h [ 106200 ]
          Time Spent 35.75h [ 128700 ] 37.75h [ 135900 ]
          Worklog Id 200689 [ 200689 ]
          sonali.farakate Sonali Farakate (Inactive) made changes -
          Remaining Estimate 29.5h [ 106200 ] 24h [ 86400 ]
          Time Spent 37.75h [ 135900 ] 43.25h [ 155700 ]
          Worklog Id 200881 [ 200881 ]
          akash.thakur Akash Thakur (Inactive) logged work - 17/Sep/19 11:42 PM
          • Time Spent:
            2h
             

            All test case check ins and corrections 17 sept

          Hide
          rohan.khandave Rohan J Khandave (Inactive) added a comment -

          Done with test case changes. Please take latest of DMS-1900 branch.

          Show
          rohan.khandave Rohan J Khandave (Inactive) added a comment - Done with test case changes. Please take latest of DMS-1900 branch.
          rohan.khandave Rohan J Khandave (Inactive) made changes -
          Assignee Rohan J Khandave [ rohan.khandave ] Harshveer Singh [ harshveer.singh ]
          akash.thakur Akash Thakur (Inactive) made changes -
          Remaining Estimate 24h [ 86400 ] 22h [ 79200 ]
          Time Spent 43.25h [ 155700 ] 45.25h [ 162900 ]
          Worklog Id 201206 [ 201206 ]
          Ashish.Durani Ashish Durani made changes -
          Status In Progress [ 3 ] In QA Testing [ 11901 ]
          Ashish.Durani Ashish Durani made changes -
          Assignee Harshveer Singh [ harshveer.singh ] Priya Dhamande [ priya.dhamande ]
          rohan.khandave Rohan J Khandave (Inactive) logged work - 25/Sep/19 07:52 AM
          • Time Spent:
            2h
             

            Merged develop branch
            Resolved conflicts
            Run all test cases

          rohan.khandave Rohan J Khandave (Inactive) made changes -
          Remaining Estimate 22h [ 79200 ] 20h [ 72000 ]
          Time Spent 45.25h [ 162900 ] 47.25h [ 170100 ]
          Worklog Id 202379 [ 202379 ]
          Hide
          priya.dhamande Priya Dhamande (Inactive) added a comment -

          No QA inputs required. So, marking jira done.

          Rohan J Khandave Samir Ramya Tantry Sachin Hingole Hrishikesh Deshpande

          Show
          priya.dhamande Priya Dhamande (Inactive) added a comment - No QA inputs required. So, marking jira done. Rohan J Khandave Samir Ramya Tantry Sachin Hingole Hrishikesh Deshpande
          priya.dhamande Priya Dhamande (Inactive) made changes -
          Resolution Done [ 10000 ]
          Status In QA Testing [ 11901 ] Done [ 10001 ]
          priya.dhamande Priya Dhamande (Inactive) made changes -
          Assignee Priya Dhamande [ priya.dhamande ] Rohan J Khandave [ rohan.khandave ]
          Transition Time In Source Status Execution Times
          Rohan J Khandave (Inactive) made transition -
          To Do In Progress
          23h 31m 1
          Rohan J Khandave (Inactive) made transition -
          In Progress In Progress
          7h 6m 1
          Ashish Durani made transition -
          In Progress In QA Testing
          8d 17m 1
          Priya Dhamande (Inactive) made transition -
          In QA Testing Done
          17h 55m 1

            People

            Assignee:
            rohan.khandave Rohan J Khandave (Inactive)
            Reporter:
            rohan.khandave Rohan J Khandave (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Time Tracking

                Estimated:
                Original Estimate - 64h Original Estimate - 64h
                64h
                Remaining:
                Time Spent - 47.25h Remaining Estimate - 20h
                20h
                Logged:
                Time Spent - 47.25h Remaining Estimate - 20h
                47.25h