Testing Controller
Why?
This infrastructure is trying to add the ability to astro to test the combination of any source connector to any destination connector. Until now, we were only able to test a specific combination, for example Github to Strapi3 using Postman. As part of the simplified connector work, we wanted the ability to easily test each new connector.
What?
Testing Controller has 2 types of tests:
ks-min: Minimum amount of fields, for example: a basic content with just a titleks-max: All possible fields in a content, all filled with data.
Testing Controller will test 3 main things:
CompareNumberOfSystemContents: Based on a Definition/Content Type, it will test the amount of contents thedestinationshould have after a successful sync.CompareNumberOfBinaries: It will test the amount of Binaries/File Assets thatdestinationshould have after a successful sync.CompareContentSystemDataToMotation: Compares the Motation fields value with the System Data fields value
How?
You can run a test between any source to any destination
dotCMStoStrapi
./astro.sh test --source dotcms --destination strapi --type ks-minStrapi4toSCP
./astro.sh test --source strapi4 --destination scp --type ks-minAfter each test is ran, you will get a Result table + important information related to SUCCESS or ERRORS
+---+---------------------------------------------------------------------------+--------------------------------------+
| | TRANSACTION ID | B794B184-71C4-11ED-8FF4-0242C0A8800F |
+---+---------------------------------------------------------------------------+--------------------------------------+
| # | Name | Result |
+---+---------------------------------------------------------------------------+--------------------------------------+
| 0 | compareNumberOfSystemContents - Definition: Ksmax, Count: 1 | Test Success |
| 1 | compareNumberOfSystemContents - Definition: webPageContent, Count: 2 | Test Success |
| 2 | compareNumberOfBinaries - Binary Count: 3 | Test Success |
| 3 | compareContentSystemDataToMotation - 35891a5a-d1fc-4ccd-9f49-8cb3b4219ebf | Test Success |
| 4 | compareContentSystemDataToMotation: 37996e78-c97e-4b94-aeaa-806d821f6293 | Test Ignored |
| 5 | compareContentSystemDataToMotation - 6ec2b41a-8fa9-4341-8efb-d597af9205d7 | Test Success |
| 6 | compareContentSystemDataToMotation - 90ec36f6-2aa2-4288-bfb1-bab0e152eadb | Test Success |
| 7 | compareContentSystemDataToMotation: b3eee8aa-f664-46a8-992a-f29915396fe4 | Test Ignored |
+---+---------------------------------------------------------------------------+--------------------------------------+
| | RESULT | TEST SUCCESS |
+---+---------------------------------------------------------------------------+--------------------------------------+
Tests passedLast updated
Was this helpful?