---
id: video/V4zCPAsYi_Y
type: video
title: "Getting Started With Agent Testing: Test Setup and Structuring (part 3)"
summary: "Structuring and setting up data-driven tests for Business Central agents: YAML data sets, XML suite configuration, reusable AL codeunits, P0/P1/load/variation categories, and a PowerShell runner for CI/CD against sandboxes. Part 3 of an agent testing series, using a sales return agent as the example."
tier: official
language: en
tags:
  - agent testing
  - test setup
  - data-driven tests
  - yaml configuration
  - powershell automation
  - ci/cd pipelines
  - test categorization
  - al development
system: copilot
review:
  state: reviewed
  by: opus
  at: "2026-10-07T22:47:32.774Z"
  flags: []
generated:
  at: "2026-10-07T22:47:32.815Z"
  pipeline: 0.2.0
  prompts:
    extract-video: 1
    summarize-video: 2
  input_hash: b18dad092b2d230e40fb5430ba3e1b85b96630afa15ae53604a2d0f5ed3d3e92
evidence:
  - kind: video
    url: https://www.youtube.com/watch?v=V4zCPAsYi_Y&t=329s
    title: "LLM as judge for test validation: announced"
    date: "2026-06-29T13:51:31.000Z"
    commit: null
    t: 329
    quote: we are planning to introduce LLM as a judge and this one is to verify the user intervention if it is containing the text
  - kind: video
    url: https://www.youtube.com/watch?v=V4zCPAsYi_Y&t=29s
    title: "Getting Started With Agent Testing: Test Setup and Structuring (part 3)"
    date: "2026-06-29T13:51:31.000Z"
    commit: null
    t: 29
    quote: the AL test is what ends looping through the turn verifying their outcome. So the data sets are defining the input in the form
  - kind: video
    url: https://www.youtube.com/watch?v=V4zCPAsYi_Y&t=49s
    title: "Getting Started With Agent Testing: Test Setup and Structuring (part 3)"
    date: "2026-06-29T13:51:31.000Z"
    commit: null
    t: 49
    quote: you need to depend on this new app this AI development toolkit evaluation which is uh the app uh we recommend using
  - kind: video
    url: https://www.youtube.com/watch?v=V4zCPAsYi_Y&t=110s
    title: "Getting Started With Agent Testing: Test Setup and Structuring (part 3)"
    date: "2026-06-29T13:51:31.000Z"
    commit: null
    t: 110
    quote: we're actually reusing one code unit with multiple data sets, which so which highlights also how easy it is now to to create new
  - kind: video
    url: https://www.youtube.com/watch?v=V4zCPAsYi_Y&t=155s
    title: "Getting Started With Agent Testing: Test Setup and Structuring (part 3)"
    date: "2026-06-29T13:51:31.000Z"
    commit: null
    t: 155
    quote: we usually define a set of P 0 tests. Those are the ones that you should expect to to pass pretty often. Uh, they
  - kind: video
    url: https://www.youtube.com/watch?v=V4zCPAsYi_Y&t=258s
    title: "Getting Started With Agent Testing: Test Setup and Structuring (part 3)"
    date: "2026-06-29T13:51:31.000Z"
    commit: null
    t: 258
    quote: Currently it's only possible to run these tests in the sandboxes. Unfortunately, it's not possible to run them on prem for the algo images
  - kind: video
    url: https://www.youtube.com/watch?v=V4zCPAsYi_Y&t=301s
    title: "Getting Started With Agent Testing: Test Setup and Structuring (part 3)"
    date: "2026-06-29T13:51:31.000Z"
    commit: null
    t: 301
    quote: So you can find a sample test which is called the sales validation agent test at the BCT.
  - kind: video
    url: https://www.youtube.com/watch?v=V4zCPAsYi_Y&t=313s
    title: "Getting Started With Agent Testing: Test Setup and Structuring (part 3)"
    date: "2026-06-29T13:51:31.000Z"
    commit: null
    t: 313
    quote: this one is not on BCT. If you need it, reach out to us and we can provide the codes to you
  - kind: video
    url: https://www.youtube.com/watch?v=V4zCPAsYi_Y&t=329s
    title: "Getting Started With Agent Testing: Test Setup and Structuring (part 3)"
    date: "2026-06-29T13:51:31.000Z"
    commit: null
    t: 329
    quote: we are planning to introduce LLM as a judge and this one is to verify the user intervention if it is containing the text
links:
  learn: []
  objects: []
  features: []
  topics: []
  localizations: []
  videos: []
  posts: []
  guidelines: []
video_id: V4zCPAsYi_Y
channel: yt-microsoft
source_name: Microsoft Dynamics 365 Business Central (YouTube)
url: https://www.youtube.com/watch?v=V4zCPAsYi_Y
published_at: "2026-06-29T13:51:31.000Z"
duration_s: 416
captions: full
audience:
  - developer
  - functional consultant
chapters:
  - t: 0
    title: Test structure and three core components
  - t: 49
    title: AI Development Toolkit and dependencies
  - t: 86
    title: Configuration file example and code unit reuse
  - t: 122
    title: Installation code unit and YAML file loading
  - t: 155
    title: "Test categorization: P0, P1, load and variation tests"
  - t: 222
    title: Sales return agent test example
  - t: 246
    title: PowerShell support for CI/CD pipelines
  - t: 290
    title: Test runner location and sample availability
  - t: 313
    title: "Future plans: LLM judge and Visual Studio Code integration"
  - t: 359
    title: Call to action and feedback request
features:
  - name: AI Development Toolkit Evaluation app
    status: unclear
    t: 49
    verified: false
    status_source: video
  - name: AI Test Toolkits
    status: unclear
    t: 49
    verified: false
    status_source: video
  - name: Test Suite Management methods
    status: unclear
    t: 122
    verified: false
    status_source: video
  - name: Data-driven test structure with YAML
    status: unclear
    t: 86
    verified: false
    status_source: video
  - name: P0 test category
    status: unclear
    t: 155
    verified: false
    status_source: video
  - name: P1 scenario tests
    status: unclear
    t: 165
    verified: false
    status_source: video
  - name: Load and variation tests
    status: unclear
    t: 192
    verified: false
    status_source: video
  - name: PowerShell test runner for AL tests
    status: unclear
    t: 246
    verified: false
    status_source: video
  - name: LLM as judge for test validation
    status: announced
    t: 329
    verified: true
    status_source: video
  - name: Visual Studio Code test execution
    status: unclear
    t: 349
    verified: false
    status_source: video
  - name: Agent-assisted agent implementation
    status: unclear
    t: 359
    verified: false
    status_source: video
objects_mentioned:
  - other AI Development Toolkit Evaluation
  - other AI Test Toolkits
  - codeunit AI Test Suite Management
  - other Sales Validation Agent Test
  - other Sales Return Agent
quotes:
  - t: 29
    text: the AL test is what ends looping through the turn verifying their outcome. So the data sets are defining the input in the form
    check: exact
  - t: 49
    text: you need to depend on this new app this AI development toolkit evaluation which is uh the app uh we recommend using
    check: exact
  - t: 110
    text: we're actually reusing one code unit with multiple data sets, which so which highlights also how easy it is now to to create new
    check: exact
  - t: 155
    text: we usually define a set of P 0 tests. Those are the ones that you should expect to to pass pretty often. Uh, they
    check: exact
  - t: 258
    text: Currently it's only possible to run these tests in the sandboxes. Unfortunately, it's not possible to run them on prem for the algo images
    check: exact
  - t: 301
    text: So you can find a sample test which is called the sales validation agent test at the BCT.
    check: exact
  - t: 313
    text: this one is not on BCT. If you need it, reach out to us and we can provide the codes to you
    check: exact
  - t: 329
    text: we are planning to introduce LLM as a judge and this one is to verify the user intervention if it is containing the text
    check: exact
---

# Getting Started With Agent Testing: Test Setup and Structuring (part 3)

> Structuring and setting up data-driven tests for Business Central agents: YAML data sets, XML suite configuration, reusable AL codeunits, P0/P1/load/variation categories, and a PowerShell runner for CI/CD against sandboxes. Part 3 of an agent testing series, using a sales return agent as the example.

[Watch on YouTube](https://www.youtube.com/watch?v=V4zCPAsYi_Y) · Microsoft Dynamics 365 Business Central (YouTube) · 2026-06-29 · 6:56 · tier official · reviewed (checked by Opus)

## Overview

The video explains how an agent test is built from three parts: data sets that define the input, an AL codeunit that loops through the turns and verifies the outcome, and configuration that ties them together. Tests depend on the AI Development Toolkit Evaluation app, which brings the AI Test Toolkits and the agent test library with utility methods. An installation codeunit uses the AI Test Suite Management methods to load YAML and XML files into the environment.

It then covers categorizing tests (P0, P1, load, variation), shows a sales return agent example where one codeunit is reused across several data sets, and describes a PowerShell module for running tests in CI/CD pipelines. The presenters note this is a first version, ask for feedback, and list planned work: LLM as judge, running tests from Visual Studio Code, and more samples.

## Key points

- An agent test has three core parts: data sets define the input, an AL test codeunit loops through the turns and verifies the outcome, and configuration files wire them together.
- Add a dependency on the AI Development Toolkit Evaluation app, which the presenters recommend. It provides the AI Test Toolkits and agent test library utility methods.
- YAML files hold data sets and XML files hold test suite configuration. An installation codeunit imports them using the AI Test Suite Management methods.
- One codeunit can be reused across multiple data sets, so adding a new test case mostly means adding data.
- Categorize tests: P0 for happy-path tests that should usually pass and run fast and often, P1 for specific scenarios and edge cases, plus load tests (slower, run less often) and variation tests.
- The PowerShell test runner supports CI/CD with token-based authentication, but only against sandboxes. It does not run on-prem or on AL-Go images.
- The sales validation agent test sample is on BCT. The sales return agent sample is not on BCT yet and is available on request. The PowerShell runner ships in the image under Applications, test framework, test runner. LLM as judge, running tests from Visual Studio Code, and agent-assisted agent implementation are planned.

## Chapters

- [0:00](https://www.youtube.com/watch?v=V4zCPAsYi_Y&t=0s) Test structure and three core components
- [0:49](https://www.youtube.com/watch?v=V4zCPAsYi_Y&t=49s) AI Development Toolkit and dependencies
- [1:26](https://www.youtube.com/watch?v=V4zCPAsYi_Y&t=86s) Configuration file example and code unit reuse
- [2:02](https://www.youtube.com/watch?v=V4zCPAsYi_Y&t=122s) Installation code unit and YAML file loading
- [2:35](https://www.youtube.com/watch?v=V4zCPAsYi_Y&t=155s) Test categorization: P0, P1, load and variation tests
- [3:42](https://www.youtube.com/watch?v=V4zCPAsYi_Y&t=222s) Sales return agent test example
- [4:06](https://www.youtube.com/watch?v=V4zCPAsYi_Y&t=246s) PowerShell support for CI/CD pipelines
- [4:50](https://www.youtube.com/watch?v=V4zCPAsYi_Y&t=290s) Test runner location and sample availability
- [5:13](https://www.youtube.com/watch?v=V4zCPAsYi_Y&t=313s) Future plans: LLM judge and Visual Studio Code integration
- [5:59](https://www.youtube.com/watch?v=V4zCPAsYi_Y&t=359s) Call to action and feedback request

## Features

| Feature | Status | At | Evidence |
|---|---|---|---|
| AI Development Toolkit Evaluation app | status not stated | [0:49](https://www.youtube.com/watch?v=V4zCPAsYi_Y&t=49s) |  |
| AI Test Toolkits | status not stated, demoed | [0:49](https://www.youtube.com/watch?v=V4zCPAsYi_Y&t=49s) |  |
| Test Suite Management methods | status not stated | [2:02](https://www.youtube.com/watch?v=V4zCPAsYi_Y&t=122s) |  |
| Data-driven test structure with YAML | status not stated, demoed | [1:26](https://www.youtube.com/watch?v=V4zCPAsYi_Y&t=86s) |  |
| P0 test category | status not stated | [2:35](https://www.youtube.com/watch?v=V4zCPAsYi_Y&t=155s) |  |
| P1 scenario tests | status not stated | [2:45](https://www.youtube.com/watch?v=V4zCPAsYi_Y&t=165s) |  |
| Load and variation tests | status not stated | [3:12](https://www.youtube.com/watch?v=V4zCPAsYi_Y&t=192s) |  |
| PowerShell test runner for AL tests | status not stated | [4:06](https://www.youtube.com/watch?v=V4zCPAsYi_Y&t=246s) |  |
| LLM as judge for test validation | announced | [5:29](https://www.youtube.com/watch?v=V4zCPAsYi_Y&t=329s) | "we are planning to introduce LLM as a judge and this one is to verify the user intervention if it is containing the text" ([5:29](https://www.youtube.com/watch?v=V4zCPAsYi_Y&t=329s)) |
| Visual Studio Code test execution | status not stated | [5:49](https://www.youtube.com/watch?v=V4zCPAsYi_Y&t=349s) |  |
| Agent-assisted agent implementation | status not stated | [5:59](https://www.youtube.com/watch?v=V4zCPAsYi_Y&t=359s) |  |

## AL objects mentioned

As heard in the captions. A name that matches one object page by exact type and name links to it; the others stay as named.

- other "AI Development Toolkit Evaluation" at [0:49](https://www.youtube.com/watch?v=V4zCPAsYi_Y&t=49s)
- other "AI Test Toolkits" at [1:09](https://www.youtube.com/watch?v=V4zCPAsYi_Y&t=69s)
- codeunit "AI Test Suite Management" at [2:02](https://www.youtube.com/watch?v=V4zCPAsYi_Y&t=122s)
- other "Sales Validation Agent Test" at [5:01](https://www.youtube.com/watch?v=V4zCPAsYi_Y&t=301s)
- other "Sales Return Agent" at [5:13](https://www.youtube.com/watch?v=V4zCPAsYi_Y&t=313s)

Not found in BC28-30: codeunit "AI Test Suite Management".

## Quotes

- [0:29](https://www.youtube.com/watch?v=V4zCPAsYi_Y&t=29s) "the AL test is what ends looping through the turn verifying their outcome. So the data sets are defining the input in the form"
- [0:49](https://www.youtube.com/watch?v=V4zCPAsYi_Y&t=49s) "you need to depend on this new app this AI development toolkit evaluation which is uh the app uh we recommend using"
- [1:50](https://www.youtube.com/watch?v=V4zCPAsYi_Y&t=110s) "we're actually reusing one code unit with multiple data sets, which so which highlights also how easy it is now to to create new"
- [2:35](https://www.youtube.com/watch?v=V4zCPAsYi_Y&t=155s) "we usually define a set of P 0 tests. Those are the ones that you should expect to to pass pretty often. Uh, they"
- [4:18](https://www.youtube.com/watch?v=V4zCPAsYi_Y&t=258s) "Currently it's only possible to run these tests in the sandboxes. Unfortunately, it's not possible to run them on prem for the algo images"
- [5:01](https://www.youtube.com/watch?v=V4zCPAsYi_Y&t=301s) "So you can find a sample test which is called the sales validation agent test at the BCT."
- [5:13](https://www.youtube.com/watch?v=V4zCPAsYi_Y&t=313s) "this one is not on BCT. If you need it, reach out to us and we can provide the codes to you"
- [5:29](https://www.youtube.com/watch?v=V4zCPAsYi_Y&t=329s) "we are planning to introduce LLM as a judge and this one is to verify the user intervention if it is containing the text"

## Disclaimers in the video

- [4:18](https://www.youtube.com/watch?v=V4zCPAsYi_Y&t=258s) not-in-this-release: Currently it's only possible to run these tests in the sandboxes. Unfortunately, it's not possible to run them on prem
- [5:13](https://www.youtube.com/watch?v=V4zCPAsYi_Y&t=313s) not-in-this-release: sales return agent sample is not on BCT yet; available on request
- [5:29](https://www.youtube.com/watch?v=V4zCPAsYi_Y&t=329s) coming-later: planning to introduce LLM as a judge for test validation
- [5:49](https://www.youtube.com/watch?v=V4zCPAsYi_Y&t=349s) coming-later: looking into enabling running these tests from the visual studio code
- [5:59](https://www.youtube.com/watch?v=V4zCPAsYi_Y&t=359s) coming-later: want to ship more samples
- [6:14](https://www.youtube.com/watch?v=V4zCPAsYi_Y&t=374s) coming-later: making this fully possible for the agents to implement
- [6:29](https://www.youtube.com/watch?v=V4zCPAsYi_Y&t=389s) preview: Keep in mind this is the first version. We are really looking forward to your feedback

Presenters (as heard): Quin, Nicolola.
