A library must be tested on Windows, Ubuntu and macOS against three runtime versions each. The team wants one pipeline definition that expands to all nine combinations. What should they use?
Show answer and explanation
Answer: C
A matrix strategy in Azure Pipelines YAML defines parameter combinations and generates a job for each one. Here, the operating system and runtime version dimensions expand into nine runs from a single definition, each using the appropriate agent. This keeps the configuration in one place and guarantees identical steps across combinations. Separate files duplicate effort, a single pinned image misses platform differences, and manual reruns are slow and inconsistent.
Why the other options are wrong
- A. Separate files duplicate the same steps across several definitions, so every change must be made in multiple places and the combinations drift apart over time.
- B. Testing only one image leaves Windows and macOS behavior unverified, and a manual note does not produce the coverage the library needs.
- D. Running nine manual triggers is error-prone and time-consuming, and nothing guarantees each run uses identical steps or records a consistent result.