Skip to content

Latest commit

 

History

History
54 lines (41 loc) · 3.62 KB

File metadata and controls

54 lines (41 loc) · 3.62 KB

Contributing to Arcus Testing

🎉 First off, thank you for taking the time to contribute!
We're really glad you're reading this.

This guide helps newcomers to contribute effectively to Arcus Testing.

  • 🐞 I found a bug!
    Great Scott! Please report the problem so we can have a look, or if you're up to it: you can always fix it yourself and submit a PR.

  • ❔ I have a question or an idea
    GitHub discussions is the place to host discussions, questions or ideas related to anything available in the codebase. Ideas can always be transformed in workable GitHub issues once the team decides to place this on the roadmap.

  • 👷‍♀️ I want to work
    Have a look at our good first issues to get you started on something easy. Please comment on the issue, so we can assign you to it.

Submitting a PR

When you submit a new pull request, please make sure that:

  • 📦 it packages everything related to the feature/bug
  • 🧪 it proofs using tests the feature/bugfix (both unit & integration tests are available to run locally)
  • 🌐 it updates the documentation, if necessary (changes should happen in the /docs/preview/ folder)

FAQ

How to run the integration tests locally? The integration tests make use of real Azure resources, which means that the test suite needs to be aware of which resources you want to use locally.

👉 If you're a Codit employee, we can also provide you with a ready-to-use appsettings.local.json that allows you to run the tests locally.

  1. Make sure you have an active Azure subscription.

  2. Set up a valid managed identity connection:
    The tests use DefaultAzureCredential to authenticate themselves, which means that you can use your logged-in VisualStudio/AzureCLI user to run the tests locally.

  3. Add the necessary Azure resources for your test:
    The file /build/templates/test-resources.bicep allows you deploy all the necessary Azure resources that are required to run all the tests.

    • 💡 Usually, you don't need to run all the tests locally. Arcus Testing is very flexible and modular. If you're working on something, like Azure Blob Storage-related, then you only need an Azure Storage Account.

    • ⚠️ Make sure that you have enough rights on your Azure resources to do CRUD operations (ex. the Azure Blob Storage tests require Storage Blob Data Contributor-rights.)

  4. Add an appsettings.local.json file to your integration test project - this file is ignored in Git by default:
    The local file needs to have the names of your Azure resources. If you deployed an Azure Storage Account, the file will look like this:

    {
      "Arcus": {
         "StorageAccount": {
             "Name": "mystorageaccount"
         }
      }
    }

    🚀 Don't worry, if a value is missing, the test will fail and point you to the values you require to run the test.

  5. You can now run the tests locally! 🎉