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.
Then specify the test case inputs and expected outputs in the generated testconfig.json file.
Run unit tests
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>]
The feature only takes local static data file as inputs and outputs to a local folder.
Time policies (late arrival tolerance, event ordering policies, etc) don’t apply in unit testing.
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.