---
title: "Create a Test Automatically with Assembly Output in Quality Inspector"
app: "Quality Inspector"
section: "How-to guides"
last_updated: "2025-12-18"
url: "https://insight-works.com/kb/quality-inspector/create-a-test-automatically-with-assembly-output-in-quality-inspector/"
---

# Create a Test Automatically with Assembly Output in Quality Inspector

This walkthrough goes through a scenario of having a quality inspection test created automatically when posting assembly output.

 Note: This walkthrough uses the standard Contoso data available in a demo Business Central 25 install.

Assembly orders are simple ways to assembly finished goods. Tests from assembly tend to be based on packaging validation or similar styles of checklists.

### Prerequisites

- Use a W1-ENU-Extended base data with “Contoso” sample demo data as a baseline with the “1925-W” item, configured with replenishment for assembly. This is used to copy into 1925-W-T.
- Ensure the Assisted Setup Wizard was run.
- If any previous test cases were followed, set the Activation Trigger to “Disabled” on all existing test generation rules.
- On the Quality Inspection Setup, set _Show Test_ to “Automatic and Manually Created Tests”.
- Have an item tracking code, such as “LOTALL”, configured to require lots and use lot warehouse tracking.
- Have a lot tracked item configured with assembly order replenishment. In Contoso data, copy item 1925-W to 1925-W-T, and set the item tracking code on the lot tracked item to be “LOTALL”.
- Ensure there are sufficient work center and machine center calendars calculated for the routing used, and ensure there is sufficient inventory for the Bill of Material used.

### Create a Quality Inspection Test

1. Navigate to _Quality Inspection Templates_ in Business Central.
2. Click **+New**.
3. Input a unique, unused code into the _Code_field (e.g., If this is a clean install, this might be “MYASSMEXAMPLE”).
4. Input a description in the _Description_ field (e.g., If this is a clean install, this might be “My Assembly Example”).
5. Select **Add Field(s) To This Template** (Quality Inspection Field Wizard opens).
6. Select **New Field** and select **Next**.
7. Input a unique, unused description (e.g., “Any field will do”) and tab off the field (the _short name (Field Code)_and _What type of data is it_options appear).
8. Leave the _Short name (Field Code)_unchanged (based on the description and attempt to be a unique, unused field code).
9. Select **A number** in the _What type of data is it_ field.
10. Select **Next**(the next wizard page describes _Number Field Details and_ displays a default value and allows defining the allowed values and pass values).
11. Select **Next**(the next wizard page describes _Number Field Details and_ displays a default value and allows defining the allowed values and pass values).
12. Locate the _Set the range of allowed values_ section and set the _Minimum_ field to 5 (minimum value you can enter).
13. Set the _Maximum_field to 50 (maximum value you can enter).
14. Locate the _Field Conditions_section and set the _Pass Min_to 10 (minimum value to be considered a Pass).
15. Set the _Pass Max_field to 20 (maximum value to be considered a Pass).
16. Select **Finish**.

The Add Field Wizard closes, and the new field is added to the Quality Inspection Template.

### Create a Test Generation Rule

Complete the following immediately after completing _Create a Quality Inspection Test_.

1. Select **Test Generation Rules** (_Quality Inspection Test Generation Rules_ page opens, filtered to the above template).
2. Select **Create Production Rule**.
3. Select your new template in the _Choose Template _field.
4. Select **Next**.
5. Select **Assembly Orders** in the _Choose whether this is for production orders or assembly orders_
6. Select **Next**.
7. Leave the _to bin_ location and description fields blank.
8. Select **Next**.
9. Select “1925-W-T ” (or the lot tracked item configured with production replenishment configured in the prerequisites) in the _Specific Item_
10. Select **Next**.
11. Ensure _When Output is Posted_ is selected in the _Automatically Create Test _field.
12. Select **Finish**.

After the wizard closes, a test generation rule is created.

### Use the Test Generation Rule to Create a Quality Inspection Test

Complete the following immediately after completing _Create a Test Generation Rule_.

1. Locate the Test Generation Rule record you created on the _Test Generation Rules_ page.
2. Modify the following fields:

   1. Activation Trigger: Manual or Automatic
   2. Production Trigger: When Output is Posted
3. Close the following pages if they are still open:

   1. Test Generation Rules
   2. Quality Inspection Template
   3. Quality Inspection Templates
4. Navigate to _Assembly Orders_.
5. Select **+New**.
6. Tab off the field (generates a document number) on the _Assembly Order_ page.
7. Ensure the _Source Type_ is set to “Item”.
8. Set the _Source No._ to “1925-W-T ” or the lot tracked item configured with production replenishment configured in the pre-requisites.
9. Set the _Quantity_ field to be “5”.
10. Select **Order** / **Item Tracking Lines**.
11. Set the _Lot No._ and _Quantity (base)._ fields to match.
12. Close the item tracking screen.
13. Select **Home**/ **Post**.
14. Select **Yes**if prompted “Do you want to post the Order”.

A Quality Inspection Test is created.

### End Result

The quantity from the _Assembly Order_ is set, the _Item No._ is set, and the lot number matches what was entered on the item tracking lines.
