-
Notifications
You must be signed in to change notification settings - Fork 176
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
AI TestToolkit: Support uploading of dataset and suite xml from AITes…
…tContext (#2149) <!-- Thank you for submitting a Pull Request. If you're new to contributing to BCApps please read our pull request guideline below * https://github.com/microsoft/BCApps/Contributing.md --> #### Summary <!-- Provide a general summary of your changes --> Support loading of dataset and xml during OnInstall of the AI test apps Introduce two new methods in AIT Test Context: `ImportTestInputs`: 2. Overwrite dataset if it is imported by the same test app 3. Throw an error if the app is modifying an existing dataset uploaded by a different app `ImportAITestSuite`: 1. Skip if the same suite is already imported by the same app 2. Error if the same suite is already imported with a different XML by the same app 4. Error if the same suite is already imported by a different app Example usage from Test App: ``` codeunit 139784 "SLS Test Install" { Subtype = Install; trigger OnInstallAppPerCompany() var AITALTestSuiteMgt: Codeunit "AIT AL Test Suite Mgt"; ResInStream: InStream; begin NavApp.GetResource(ResFilePath, ResInStream); AITALTestSuiteMgt.ImportTestInputs(FileName, ResInStream); NavApp.GetResource(ResFilePath, ResInStream); AITALTestSuiteMgt.ImportAITestSuite(ResInStream); end; } ``` #### Work Item(s) <!-- Add the issue number here after the #. The issue needs to be open and approved. Submitting PRs with no linked issues or unapproved issues is highly discouraged. --> Fixes [AB#542465](https://dynamicssmb2.visualstudio.com/1fcb79e7-ab07-432a-a3c6-6cf5a88ba4a5/_workitems/edit/542465)
- Loading branch information
Showing
7 changed files
with
164 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters