We are enriching the CI/CD tools to add the support for query unit testing for Azure Stream Analytics! Now you can add and run unit tests for your Stream Analytics jobs on any arbitrary machine or in a CI/CD pipeline.
The unit test cases run on a fully functioned Stream Analytics single node runtime locally. It’s very easy to use the query unit testing feature with the Stream Analytics CI/CD tools. This article will walk through the main steps. Please refer our documentation for more details and for the commands to be used for adding and running a test case.
In any command terminal, run the command 'addtestcase' to add a test case template for your project. If the template already exists, it will add a new test case in the file.
azure-streamanalytics-cicd addtestcase -project <projectFullPath> [-testConfigPath] <testConfigFileFullPath>
Then specify the test case inputs and expected outputs in the generated testconfig.json file.
Use the following command to run one or multiple test cases for your project. A test report is output to the console. Testing outputs, intermediate results for each case along with a test summary file is generated in the output folder specified by ‘-outputPath’ parameter.
azure-streamanalytics-cicd test -project <projectFullPath> [-testConfigPath <testConfigFileFullPath>] [-outputPath <outputPath>] [-customCodeZipFilePath <zipFilePath>]
Check out the step by step guide on how to use the tools in general with any CI/CD systems. You can also learn more about specific instructions for build, test and deployment with Azure Pipelines.
Engage with us and get early glimpses of new features by following us on Twitter at @AzureStreaming.
The Azure Stream Analytics team is highly committed to listening to your feedback and letting the user's voice influence our future investments. We welcome you to join the conversation and make your voice heard via our UserVoice page. For tooling specific feedback you can also contact Stream Analytics tools feedback.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.