WiseFish Fishing and Quota - Test (automated tests) - Overview

This page covers the automated tests for the WiseFish Fishing and Quota extension (WiFiFQ). They are in the test app WiseFish Fishing and Quota - Test, in the folder WiFiFQ - Test of the repo WiFiFQ_WiseFish_Fishing_and_Quota.

There are 88 tests in 7 test codeunits, all passing on a BC28 container in the AL Test Tool (16.11.2026). They cover three areas: the quota journal, lot codes from the Fishing Trip No., and landing a fishing trip. Each area has its own page listing its tests (see the links below).

The test app was added in WFFQ-150 (setup, quota journal and lot code tests) and extended in WFFQ-151 (landing tests). It follows the test apps of Wisefish Farming (WFAQ-475) and Wisefish Canada (WCB-112).

The test app

Name

WiseFish Fishing and Quota - Test

Folder

WiFiFQ - Test (next to the main app folder WiFiFQ)

App ID

fdb256c4-6862-4a56-8b0c-181e4dd64f15

ID range

84000-84999

Prefix

WiFiFQT

Depends on

WiseFish Fishing and Quota, WiseFish, Library Assert, Any, Library Variable Storage, Tests-TestLibraries, System Application Test Library

Test runner

130450 (Isol. Codeunit)

The main app has no internalsVisibleTo: every procedure tested so far is public, so the tests call it the way other apps do.

Not in the pipelines: the test app is not built, deployed or run by the PR or deployment pipelines. Its folder name ends in "Test", so they skip it. The build pipelines are managed by Wise, not Wisefish, so running the tests in them is not something Wisefish can set up (see WFAQ-478, cancelled, for Wisefish Farming). The tests are run by hand in a dev container, as described below. For tickets that only change the test app, that run is the QA evidence: deploying to TEST doesn't include the test app.

How to run the tests

The repo README has the full steps. In short:

  1. Use a BC28 container with the test toolkit and the AL Test Tool (page 130451).

  2. Publish WiseFish and WiseFish Fishing and Quota (WiFiFQ) to the container.

  3. Open WiFiFQ.code-workspace, put a launch.json in WiFiFQ - Test/.vscode (it is git-ignored; copy the one from WiFiFQ), run AL: Download Symbols in WiFiFQ - Test, and publish it (Ctrl+F5).

  4. In the AL Test Tool, run Get Test Codeunits and then Run All. Run Get Test Codeunits again whenever tests have been added.

How the tests work

  • Own data: each test builds the data it needs with the feature's test library, and the test runner rolls it back after each codeunit. The libraries insert records directly (Insert(false)), and set the WiFi Setup fields a test depends on, so the tests don't depend on the company's setup or No. Series. The purchase document tests (84008) are the exception: they use Microsoft's test libraries and the company's posting setup.

  • Naming: tests are named <Area>_<nn>_<Scenario>, for example CheckLine_04_NoQuotaYearForDateFails, with [SCENARIO], [GIVEN], [WHEN] and [THEN] comments in the code.

  • Expected errors: they are checked against the app's own message text, copied into the test. asserterror rolls back the test's data, so any record needed for the assertion is read before it.

  • No posting to inventory: the own-vessel landing tests check the WiseFish TI journal line field by field. A subscriber (84010) copies the line on OnLandFishingTrip and stops the landing before it is posted.

  • Commits: landing to a purchase document commits, so those tests have a codeunit of their own (84008). The test runner still rolls the data back at the end of the codeunit.

  • Intended behaviour only: when a test finds a bug in the main app, the test is not changed to expect the bug. The bug goes to WFFQ-152 and its bug tickets (see Not covered below).

Test libraries

Codeunit

Name

Builds

84000

WiFiFQT Library - Quota

Quota systems, quota years, quota for fish types, raw materials, vessels, permits, conversion factors, fishing equipment, size grades, quota journal lines

84003

WiFiFQT Library - ItemTracking

WiFi Setup for lot codes, User Setup with a WiFi User Profile, fishing trips, raw material and product lines, item-tracked items, lots, a lot No. Series

84005

WiFiFQT Library - Fishing Trip

Fishing trips and vessels for landing, raw material, product, production and budget lines, costs of the trip, quota for a line

84010

WiFiFQT Land FT Subscriber

Not a library: a manually bound subscriber that captures the TI journal line of an own-vessel landing

Test pages

Summary

Area

Codeunit ID

Codeunit

Tests

Quota Journal

84001

WiFiFQT Quota Jnl Check

14

Quota Journal

84002

WiFiFQT Quota Jnl Post

23

Lot Codes from Fishing Trip No.

84004

WiFiFQT FT Lot Codes

11

Landing Fishing Trips

84006

WiFiFQT Land FT Checks

11

Landing Fishing Trips

84007

WiFiFQT Land FT External

11

Landing Fishing Trips

84008

WiFiFQT Land FT Purch Doc

9

Landing Fishing Trips

84009

WiFiFQT Land FT Own Vessel

9

Total

88

Not covered

Possible bugs found while writing the tests are collected in WFFQ-152. They are not tested here: a test is written with the fix, in the bug's own ticket.

  • Decisions needed (sub-tasks of WFFQ-152): WFFQ-153, WFFQ-154, WFFQ-155, WFFQ-156, WFFQ-157, WFFQ-158.

  • Bugs: WFFQ-159 (own vessel: product quota entries take fields from the last raw material line), WFFQ-160 (own vessel: a product line from a purchase agreement gets a blank posting date), WFFQ-161 (long Fishing Trip No.: string length error instead of the lot code error).

Other areas of WiseFish Fishing and Quota have no automated tests yet, for example hauls and the hold card, grading and price adjustment, settlement, closing a fishing trip, the adjustment journal, quota budgets, GDST, TrackWell and the API pages.