Skip to content

Challenge 3 (Implement continuous testing)

Steve Yi edited this page Feb 10, 2022 · 2 revisions

Regardless of how carefully you write and review code, workflow automation not only increases velocity but also helps you avoid one-off issues, regressions and the “works on my machine” phenomenon.

Challenge You are expected to create workflows to automate the building, unit testing and packaging of at least one of the APIs of your application. You are not required to publish code coverage reports or resulting packages. Instead, focus exclusively on executing existing unit tests as part of your workflows. Carefully review the Readme for chosen API as it may contain additional instructions.

Note: When selecting GitHub Actions, Azure DevOps Tasks or Jenkins Plugins; be prudent and select ones that were created by the vendor as a first choice. If you are going to use a third party option make sure that you verify that you are able to satisfy the success criteria with your selection.

Success Criteria With your coach present, execute the automation workflow and explain each step. Demonstrate that the workflow is triggered for an API, only when changes are made to code for that API. Demonstrate that the workflow(s) augment existing branch protections, by performing verifications before a Pull Request (PR) can be merged to your protected branch. Demonstrate that your pipeline runs, performs all of the required steps and then ultimately prevents the merging of the code when the workflow fails. Demonstrate that your workflow creates and issue/bug in your backlog for each failed build Note: You are required to make a change that will cause on of your unit tests to fail. If you are uncertain, your coach will provide a breaking change to submit through your pipeline.

Challenge 3 (GitHub to ADO for build, test, failure):

Creation of bug after workflow fails in ADO: https://github.com/marketplace/actions/github-action-to-create-an-azure-devops-bug-workitem-when-a-workflow-fails

GitHub Personal Access Tokens: https://docs.microsoft.com/en-us/azure/devops/organizations/accounts/use-personal-access-tokens-to-authenticate?view=azure-devops&tabs=Windows

Sync GitHub issue to ADO Work Item: https://github.com/marketplace/actions/github-issues-to-azure-devops

Clone this wiki locally