Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Running a preconfigured test suite with ALOpsAppTest seems not to work right when ran after a previous ALOpsAppTest task #520

Closed
lvanvugt opened this issue May 26, 2022 · 10 comments
Labels
documentation Improvements or additions to documentation question Further information is requested

Comments

@lvanvugt
Copy link

Issue

Wanting to run my API tests I have added an Install codeunit to my app to setup the test suite API to contain a specific set of test codeunits (actually only one right now, see below codeunit LookupValue APIV1 (81090 )) and have another test runner codeunit assigned to it, i.e. Test Runner - Isol. Disabled (130451).

Install Codeunit

codeunit 80097 "Install API TestSuite"
{
    Subtype = Install;

    trigger OnInstallAppPerCompany()
    begin
        SetupTestSuite();
    end;

    local procedure SetupTestSuite()
    var
        ALTestSuite: Record "AL Test Suite";
        TestSuiteMgt: Codeunit "Test Suite Mgt.";
        SuiteName: Code[10];
    begin
        SuiteName := 'API';

        if ALTestSuite.Get(SuiteName) then
            ALTestSuite.Delete(true);

        TestSuiteMgt.CreateTestSuite(SuiteName);
        ALTestSuite.Get(SuiteName);

        TestSuiteMgt.SelectTestMethodsByRange(ALTestSuite, '81090');
        TestSuiteMgt.ChangeTestRunner(ALTestSuite, 130451);
    end;
}

ALOpsAppTest tasks

I have added the following tasks to my .yml expecting the 2nd will run that specific test suite.

- task: ALOpsAppTest@1
  displayName: 'ALOPS - Run TestSuite'
  inputs:
    usedocker: true
    disabledtests: '$(Build.SourcesDirectory)/LookupValue Extension/Test/disabledtests/DisabledTests.json'
    import_testtoolkit: false
    import_action: 'Skip'
    testpage: '130455'
    extensionid: '78ba7129-4003-40b6-8c5b-90d514eb088b'
    failed_test_action: 'Ignore'
  continueOnError: true

- task: ALOpsAppTest@1
  displayName: 'ALOPS - Run TestSuite for API'
  inputs:
    usedocker: true
    import_testtoolkit: false
    import_action: 'Skip'
    testpage: '130455'
    testsuite: 'API'
    failed_test_action: 'Ignore'
  continueOnError: true

ALOpsAppTest log

The 2nd does run the test suite API, but before it does it starts adding all test codeunits available in BC as the log shows. It seems that this is related to the 1st test task having disabledtests parameter set, because when I remove the 1st test task the 2nd (and now only test task) behaves as expected (see below Expected behavior).

Starting: ALOPS - Run TestSuite for API
 ==============================================================================
 Task         : ALOps App Test
 Description  : Run AL-TestSuite for Business Central
 Version      : 1.449.3024
 Author       : Hodor
 Help         : Run Business Central Test-Suite and collect results.
 ==============================================================================
 *** Validate configuration
 *** Task Inputs:
 
 name                           value
 ----                           -----
 usedocker                       True
 fixed_tag                           
 nav_serverinstance             BC140
 tenant                       default
 companyname                         
 profile                             
 bc_username                         
 bc_password                         
 bc_authentication    NavUserPassword
 bc_webclient_url                    
 testfilter                          
 disabledtests                       
 show_available_tests            True
 import_testtoolkit             False
 import_action                   Skip
 testpage                      130455
 testsuite                        API
 extensionid                         
 installaltesttool              False
 failed_test_action            Ignore
 override_finsql_path                
 resultfilename       TestResults.xml
 
 *** No ALOps License found. Set License with the [alops-licenseid] or [alops_licenseid] variables.
 *** To acquire a license, please visit: https://www.alops.be/getlicense
 *** For pricing options, please visit : https://www.alops.be/pricing
 *** For documentation, please visit   : https://www.alops.be/documentation
 
 *** ALOps License:
   * Trial Key  : d1d491ef-76ed-48d4-8f08-5664c8761e0f
   * Licensed To: Public Project (Free License)
 
 *** Importing required PS-Functions
 *** Working folder: C:\ADOAgents\Agent1\_work\22\s
 ***
 *** Prepare Docker Session
 *** Connect Docker Session
 *** Initiate Docker Session
 *** Set Docker Container ErrorActionPreference = Stop
 *** Copy Modules to Docker
 *** Setup Docker Session
 *** Checking for container-specific Test Assemblies
 *** Using container-specific Test Assemblies
 *** Import Modules in Docker Session
 *** Import UI Client [C:\Run\DevOps\BCAppTest\bin\Microsoft.Dynamics.Framework.UI.Client.dll]
 VERBOSE: Loading module from path 'C:\Run\DevOps\BCAppTest\bin\Microsoft.Dynamics.Framework.UI.Client.dll'.
 *** Import NewtonSoft JSON [C:\Program Files\Microsoft Dynamics NAV\200\Service\Newtonsoft.Json.dll]
 *** Import Modules in Docker Session: class_ClientContext
 *** Test Context Url: https://39f90db97436/BC/cs?tenant=default
 *** Setup BC Credentials in Docker
 *** Resolve Docker Credentials
 *** Set TCP Keep-Alive
 *** Start TestSuite
 *** Running TestSuite with authentication [NavUserPassword] with User [admin]
 *** Run warm-up with page [130455]
 *** Warm-up Client Context
 *** Create Client Context
 *** Get Available Tests for suite [API] with page [130455]
 Show form 0001fd97-0000-0001-0c00-0000836bd2d2
 Title: Command Line Test Tool Edit - Command Line Test Tool - API
 *** Set [CurrentSuiteName] => [API]
 [
     {
         "Tests":  [
                       "AssignLookupValueToCustomer",
                       "AssignNonExistingLookupValueToCustomer",
                       "AssignLookupValueToCustomerCard"
                   ],
         "Name":  "LookupValue UT Customer",
         "Id":  "81000"
     },
     {
         "Tests":  [
                       "AssignLookupValueToSalesHeader",
                       "AssignNonExistingLookupValueToSalesHeader",
                       "AssignLookupValueToSalesQuoteDocument",
                       "AssignLookupValueToSalesOrderDocument",
                       "AssignLookupValueToSalesInvoiceDocument",
                       "AssignLookupValueToSalesCreditMemoDocument",
                       "AssignLookupValueToSalesReturnOrderDocument",
                       "AssignLookupValueToBlanketSalesOrderDocument"
                   ],
         "Name":  "LookupValue UT Sales Document",
         "Id":  "81001"
     },
     {
         "Tests":  [
                       "AssignLookupValueToCustomerTemplate",
                       "AssignNonExistingLookupValueToCustomerTemplate",
                       "AssignLookupValueToCustomerTemplateCard"
                   ],
         "Name":  "LookupValue UT Cust. Template",
         "Id":  "81002"
     },
     {
         "Tests":  [
                       "AssignLookupValueToWarehouseShipmentLine",
                       "AssignNonExistingLookupValueToWarehouseShipmentHeader",
                       "AssignLookupValueToLineOnWarehouseShipmentDocument",
                       "CreateWarehouseShipmentFromSalesOrderWithLookupValue",
                       "GetSalesOrderWithLookupValueOnWarehouseShipment"
                   ],
         "Name":  "LookupValue Warehouse Shipment",
         "Id":  "81003"
     },
     {
         "Tests":  [
                       "ArchiveSalesOrderWithLookupValue",
                       "ArchiveSalesQuoteWithLookupValue",
                       "ArchiveSalesReturnOrderWithLookupValue",
                       "FindLookupValueOnSalesListArchive"
                   ],
         "Name":  "LookupValue Sales Archive",
         "Id":  "81004"
     },
     {
         "Tests":  [
                       "PostedSalesInvoiceAndShipmentInheritLookupValueFromSalesOrder",
                       "PostingThrowsErrorOnSalesOrderWithEmptyLookupValue",
                       "PostedWarehouseShipmentLineInheritsLookupValueFromSalesOrder",
                       "PostingThrowsErrorOnWarehouseShipmentLineWithEmptyLookupValue"
                   ],
         "Name":  "LookupValue Posting",
         "Id":  "81005"
     },
     {
         "Tests":  [
                       "InheritLookupValueFromCustomerOnSalesDocument",
                       "CreateCustomerFromContactWithLookupValue",
                       "InheritLookupValueFromCustomerTemplateToCustomer"
                   ],
         "Name":  "LookupValue Inheritance",
         "Id":  "81006"
     },
     {
         "Tests":  [
                       "TestLookupValueShowsOnCustomerListReport"
                   ],
         "Name":  "LookupValue Report",
         "Id":  "81008"
     },
     {
         "Tests":  [
                       "TestLookupValueShowsOnStandardCustomerListReport"
                   ],
         "Name":  "LookupValue Report 2",
         "Id":  "81009"
     },
     {
         "Tests":  [
                       "CreateLookupValueWithoutPermissions",
                       "CreateLookupValueWithPermissions",
                       "ReadLookupValueWithoutPermissions",
                       "ReadLookupValueWithPermissions",
                       "ModifyLookupValueWithoutPermissions",
                       "ModifyLookupValueWithPermissions",
                       "DeleteLookupValueWithoutPermissions",
                       "DeleteLookupValueWithPermissions",
                       "OpenLookupValuesPageWithoutPermissions",
                       "OpenLookupValuesPageWithPermissions",
                       "CheckLookupValueOnCustomerCardWithoutPermissions",
                       "CheckLookupValueOnCustomerCardWithPermissions",
                       "CheckLookupValueOnCustomerListWithoutPermissions",
                       "CheckLookupValueOnCustomerListWithPermissions"
                   ],
         "Name":  "LookupValue Permissions",
         "Id":  "81020"
     },
     {
         "Tests":  [
                       "CheckLookupValueOnBlanketSalesOrderWithoutPermissions",
                       "CheckLookupValueOnBlanketSalesOrderWithPermissions",
                       "CheckLookupValueOnBlanketSalesOrdersWithoutPermissions",
                       "CheckLookupValueOnBlanketSalesOrdersWithPermissions",
                       "CheckLookupValueOnCustomerTemplateCardWithoutPermissions",
                       "CheckLookupValueOnCustomerTemplateCardWithPermissions",
                       "CheckLookupValueOnCustomerTemplateListWithoutPermissions",
                       "CheckLookupValueOnCustomerTemplateListWithPermissions",
                       "CheckLookupValueOnPostedReturnReceiptWithoutPermissions",
                       "CheckLookupValueOnPostedReturnReceiptWithPermissions",
                       "CheckLookupValueOnPostedReturnReceiptsWithoutPermissions",
                       "CheckLookupValueOnPostedReturnReceiptsWithPermissions",
                       "CheckLookupValueOnPostedSalesCreditMemoWithoutPermissions",
                       "CheckLookupValueOnPostedSalesCreditMemoWithPermissions",
                       "CheckLookupValueOnPostedSalesCreditMemosWithoutPermissions",
                       "CheckLookupValueOnPostedSalesCreditMemosWithPermissions",
                       "CheckLookupValueOnPostedSalesInvoiceWithoutPermissions",
                       "CheckLookupValueOnPostedSalesInvoiceWithPermissions",
                       "CheckLookupValueOnPostedSalesInvoicesWithoutPermissions",
                       "CheckLookupValueOnPostedSalesInvoicesWithPermissions",
                       "CheckLookupValueOnPostedSalesShipmentWithoutPermissions",
                       "CheckLookupValueOnPostedSalesShipmentWithPermissions",
                       "CheckLookupValueOnPostedSalesShipmentsWithoutPermissions",
                       "CheckLookupValueOnPostedSalesShipmentsWithPermissions",
                       "CheckLookupValueOnPostedWhseShipmentLinesWithoutPermissions",
                       "CheckLookupValueOnPostedWhseShipmentLinesWithPermissions",
                       "CheckLookupValueOnPstdWhseShipmentSubformWithoutPermissions",
                       "CheckLookupValueOnPstdWhseShipmentSubformWithPermissions",
                       "CheckLookupValueOnSalesCreditMemoWithoutPermissions",
                       "CheckLookupValueOnSalesCreditMemoWithPermissions",
                       "CheckLookupValueOnSalesCreditMemosWithoutPermissions",
                       "CheckLookupValueOnSalesCreditMemosWithPermissions",
                       "CheckLookupValueOnSalesInvoiceWithoutPermissions",
                       "CheckLookupValueOnSalesInvoiceWithPermissions",
                       "CheckLookupValueOnSalesInvoiceListWithoutPermissions",
                       "CheckLookupValueOnSalesInvoiceListWithPermissions",
                       "CheckLookupValueOnSalesListWithoutPermissions",
                       "CheckLookupValueOnSalesListWithPermissions",
                       "CheckLookupValueOnSalesListArchiveWithoutPermissions",
                       "CheckLookupValueOnSalesListArchiveWithPermissions",
                       "CheckLookupValueOnSalesOrderWithoutPermissions",
                       "CheckLookupValueOnSalesOrderWithPermissions",
                       "CheckLookupValueOnSalesOrderListWithoutPermissions",
                       "CheckLookupValueOnSalesOrderListWithPermissions",
                       "CheckLookupValueOnSalesOrderArchiveWithoutPermissions",
                       "CheckLookupValueOnSalesOrderArchiveWithPermissions",
                       "CheckLookupValueOnSalesOrderArchivesWithoutPermissions",
                       "CheckLookupValueOnSalesOrderArchivesWithPermissions",
                       "CheckLookupValueOnSalesQuoteWithoutPermissions",
                       "CheckLookupValueOnSalesQuoteWithPermissions",
                       "CheckLookupValueOnSalesQuotesWithoutPermissions",
                       "CheckLookupValueOnSalesQuotesWithPermissions",
                       "CheckLookupValueOnSalesQuoteArchiveWithoutPermissions",
                       "CheckLookupValueOnSalesQuoteArchiveWithPermissions",
                       "CheckLookupValueOnSalesQuoteArchivesWithoutPermissions",
                       "CheckLookupValueOnSalesQuoteArchivesWithPermissions",
                       "CheckLookupValueOnSalesReturnOrderWithoutPermissions",
                       "CheckLookupValueOnSalesReturnOrderWithPermissions",
                       "CheckLookupValueOnSalesReturnOrderListWithoutPermissions",
                       "CheckLookupValueOnSalesReturnOrderListWithPermissions",
                       "CheckLookupValueOnSalesReturnOrderArchiveWithoutPermissions",
                       "CheckLookupValueOnSalesReturnOrderArchiveWithPermissions",
                       "CheckLookupValueOnSalesRtrnOrderListArchWithoutPermissions",
                       "CheckLookupValueOnSalesRtrnOrderListArchWithPermissions",
                       "CheckLookupValueOnWhseShipmentLinesWithoutPermissions",
                       "CheckLookupValueOnWhseShipmentLinesWithPermissions",
                       "CheckLookupValueOnWhseShipmentSubformWithoutPermissions",
                       "CheckLookupValueOnWhseShipmentSubformWithPermissions"
                   ],
         "Name":  "LookupValue Permissions 2",
         "Id":  "81021"
     },
     {
         "Tests":  [
                       "CheckInheritLookupValueFromSalesHeader"
                   ],
         "Name":  "LookupValue UT Whse Shipment",
         "Id":  "81023"
     },
     {
         "Tests":  [
                       "CheckFailureCheckLookupvalueExistsOnSalesHeaderSalesPosting",
                       "CheckSuccessCheckLookupvalueExistsOnSalesHeaderSalesPosting",
                       "CheckFailureCheckLookupvalueExistsOnSalesHeaderWhsePosting",
                       "CheckSuccessCheckLookupvalueExistsOnSalesHeaderWhsePosting"
                   ],
         "Name":  "LookupValue UT Posting",
         "Id":  "81025"
     },
     {
         "Tests":  [
                       "CheckInheritLookupValueFromCustomer",
                       "CheckApplyLookupValueFromCustomerTemplateFromContact"
                   ],
         "Name":  "LookupValue UT Inheritance",
         "Id":  "81026"
     },
     {
         "Tests":  [
                       "GetLookupValue",
                       "DeleteLookupValue",
                       "ModifyLookupValue",
                       "ModifyLookupValueWithEmptyDescription",
                       "CreateLookupValue",
                       "CreateLookupValueWithEmptyDescription"
                   ],
         "Name":  "LookupValue APIV1",
         "Id":  "81090"
     }
 ]
 *** Run Available Tests for suite [API] with page [130455]
 *** Connect TestClient with page [130455]
 Show form 0001fd97-0000-0001-0c00-0000836bd2d2
 Title: Command Line Test Tool Edit - Command Line Test Tool - API
   Codeunit 81000 LookupValue UT Customer Success (1.902 seconds)
   Codeunit 81001 LookupValue UT Sales Document Success (3.295 seconds)
   Codeunit 81002 LookupValue UT Cust. Template Success (1.534 seconds)
   Codeunit 81003 LookupValue Warehouse Shipment Success (2.522 seconds)
   Codeunit 81004 LookupValue Sales Archive Success (2.069 seconds)
   Codeunit 81005 LookupValue Posting Success (2.883 seconds)
   Codeunit 81006 LookupValue Inheritance Success (2.308 seconds)
   Codeunit 81008 LookupValue Report Success (2.213 seconds)
   Codeunit 81009 LookupValue Report 2 Success (2.191 seconds)
   Codeunit 81020 LookupValue Permissions Success (2.624 seconds)
   Codeunit 81021 LookupValue Permissions 2 Success (7.116 seconds)
   Codeunit 81023 LookupValue UT Whse Shipment Success (3.283 seconds)
   Codeunit 81025 LookupValue UT Posting Success (3.293 seconds)
   Codeunit 81026 LookupValue UT Inheritance Success (3.282 seconds)
   Codeunit 81090 LookupValue APIV1 Skipped
 True
 *** XUnit Test results: c:\Run\DevOps\TestResults.xml
 <?xml version="1.0" encoding="UTF-8"?>
 <assemblies>
   <assembly name="81000 LookupValue UT Customer" test-framework="PS Test Runner" run-date="2022-05-26" run-time="09:13:07" total="3" passed="3" failed="0" skipped="0" time="0.296">
     <collection name="LookupValue UT Customer" total="3" passed="3" failed="0" skipped="0" time="0.296" Skipped="0">
       <test name="LookupValue UT Customer:AssignLookupValueToCustomer" method="AssignLookupValueToCustomer" time="0.046" result="Pass" />
       <test name="LookupValue UT Customer:AssignNonExistingLookupValueToCustomer" method="AssignNonExistingLookupValueToCustomer" time="0" result="Pass" />
       <test name="LookupValue UT Customer:AssignLookupValueToCustomerCard" method="AssignLookupValueToCustomerCard" time="0.25" result="Pass" />
     </collection>
   </assembly>
   <assembly name="81001 LookupValue UT Sales Document" test-framework="PS Test Runner" run-date="2022-05-26" run-time="09:13:09" total="8" passed="8" failed="0" skipped="0" time="1.706">
     <collection name="LookupValue UT Sales Document" total="8" passed="8" failed="0" skipped="0" time="1.706" Skipped="0">
       <test name="LookupValue UT Sales Document:AssignLookupValueToSalesHeader" method="AssignLookupValueToSalesHeader" time="0.08" result="Pass" />
       <test name="LookupValue UT Sales Document:AssignNonExistingLookupValueToSalesHeader" method="AssignNonExistingLookupValueToSalesHeader" time="0" result="Pass" />
       <test name="LookupValue UT Sales Document:AssignLookupValueToSalesQuoteDocument" method="AssignLookupValueToSalesQuoteDocument" time="0.28" result="Pass" />
       <test name="LookupValue UT Sales Document:AssignLookupValueToSalesOrderDocument" method="AssignLookupValueToSalesOrderDocument" time="0.313" result="Pass" />
       <test name="LookupValue UT Sales Document:AssignLookupValueToSalesInvoiceDocument" method="AssignLookupValueToSalesInvoiceDocument" time="0.28" result="Pass" />
       <test name="LookupValue UT Sales Document:AssignLookupValueToSalesCreditMemoDocument" method="AssignLookupValueToSalesCreditMemoDocument" time="0.266" result="Pass" />
       <test name="LookupValue UT Sales Document:AssignLookupValueToSalesReturnOrderDocument" method="AssignLookupValueToSalesReturnOrderDocument" time="0.254" result="Pass" />
       <test name="LookupValue UT Sales Document:AssignLookupValueToBlanketSalesOrderDocument" method="AssignLookupValueToBlanketSalesOrderDocument" time="0.233" result="Pass" />
     </collection>
   </assembly>
   <assembly name="81002 LookupValue UT Cust. Template" test-framework="PS Test Runner" run-date="2022-05-26" run-time="09:13:13" total="3" passed="3" failed="0" skipped="0" time="0.046">
     <collection name="LookupValue UT Cust. Template" total="3" passed="3" failed="0" skipped="0" time="0.046" Skipped="0">
       <test name="LookupValue UT Cust. Template:AssignLookupValueToCustomerTemplate" method="AssignLookupValueToCustomerTemplate" time="0" result="Pass" />
       <test name="LookupValue UT Cust. Template:AssignNonExistingLookupValueToCustomerTemplate" method="AssignNonExistingLookupValueToCustomerTemplate" time="0.016" result="Pass" />
       <test name="LookupValue UT Cust. Template:AssignLookupValueToCustomerTemplateCard" method="AssignLookupValueToCustomerTemplateCard" time="0.03" result="Pass" />
     </collection>
   </assembly>
   <assembly name="81003 LookupValue Warehouse Shipment" test-framework="PS Test Runner" run-date="2022-05-26" run-time="09:13:14" total="5" passed="5" failed="0" skipped="0" time="0.753">
     <collection name="LookupValue Warehouse Shipment" total="5" passed="5" failed="0" skipped="0" time="0.753" Skipped="0">
       <test name="LookupValue Warehouse Shipment:AssignLookupValueToWarehouseShipmentLine" method="AssignLookupValueToWarehouseShipmentLine" time="0.25" result="Pass" />
       <test name="LookupValue Warehouse Shipment:AssignNonExistingLookupValueToWarehouseShipmentHeader" method="AssignNonExistingLookupValueToWarehouseShipmentHeader" time="0" result="Pass" />
       <test name="LookupValue Warehouse Shipment:AssignLookupValueToLineOnWarehouseShipmentDocument" method="AssignLookupValueToLineOnWarehouseShipmentDocument" time="0.223" result="Pass" />
       <test name="LookupValue Warehouse Shipment:CreateWarehouseShipmentFromSalesOrderWithLookupValue" method="CreateWarehouseShipmentFromSalesOrderWithLookupValue" time="0.14" result="Pass" />
       <test name="LookupValue Warehouse Shipment:GetSalesOrderWithLookupValueOnWarehouseShipment" method="GetSalesOrderWithLookupValueOnWarehouseShipment" time="0.14" result="Pass" />
     </collection>
   </assembly>
   <assembly name="81004 LookupValue Sales Archive" test-framework="PS Test Runner" run-date="2022-05-26" run-time="09:13:17" total="4" passed="4" failed="0" skipped="0" time="0.3">
     <collection name="LookupValue Sales Archive" total="4" passed="4" failed="0" skipped="0" time="0.3" Skipped="0">
       <test name="LookupValue Sales Archive:ArchiveSalesOrderWithLookupValue" method="ArchiveSalesOrderWithLookupValue" time="0.08" result="Pass" />
       <test name="LookupValue Sales Archive:ArchiveSalesQuoteWithLookupValue" method="ArchiveSalesQuoteWithLookupValue" time="0.064" result="Pass" />
       <test name="LookupValue Sales Archive:ArchiveSalesReturnOrderWithLookupValue" method="ArchiveSalesReturnOrderWithLookupValue" time="0.063" result="Pass" />
       <test name="LookupValue Sales Archive:FindLookupValueOnSalesListArchive" method="FindLookupValueOnSalesListArchive" time="0.093" result="Pass" />
     </collection>
   </assembly>
   <assembly name="81005 LookupValue Posting" test-framework="PS Test Runner" run-date="2022-05-26" run-time="09:13:19" total="4" passed="4" failed="0" skipped="0" time="1.093">
     <collection name="LookupValue Posting" total="4" passed="4" failed="0" skipped="0" time="1.093" Skipped="0">
       <test name="LookupValue Posting:PostedSalesInvoiceAndShipmentInheritLookupValueFromSalesOrder" method="PostedSalesInvoiceAndShipmentInheritLookupValueFromSalesOrder" time="0.343" result="Pass" />
       <test name="LookupValue Posting:PostingThrowsErrorOnSalesOrderWithEmptyLookupValue" method="PostingThrowsErrorOnSalesOrderWithEmptyLookupValue" time="0.173" result="Pass" />
       <test name="LookupValue Posting:PostedWarehouseShipmentLineInheritsLookupValueFromSalesOrder" method="PostedWarehouseShipmentLineInheritsLookupValueFromSalesOrder" time="0.437" result="Pass" />
       <test name="LookupValue Posting:PostingThrowsErrorOnWarehouseShipmentLineWithEmptyLookupValue" method="PostingThrowsErrorOnWarehouseShipmentLineWithEmptyLookupValue" time="0.14" result="Pass" />
     </collection>
   </assembly>
   <assembly name="81006 LookupValue Inheritance" test-framework="PS Test Runner" run-date="2022-05-26" run-time="09:13:22" total="3" passed="3" failed="0" skipped="0" time="0.356">
     <collection name="LookupValue Inheritance" total="3" passed="3" failed="0" skipped="0" time="0.356" Skipped="0">
       <test name="LookupValue Inheritance:InheritLookupValueFromCustomerOnSalesDocument" method="InheritLookupValueFromCustomerOnSalesDocument" time="0.107" result="Pass" />
       <test name="LookupValue Inheritance:CreateCustomerFromContactWithLookupValue" method="CreateCustomerFromContactWithLookupValue" time="0.033" result="Pass" />
       <test name="LookupValue Inheritance:InheritLookupValueFromCustomerTemplateToCustomer" method="InheritLookupValueFromCustomerTemplateToCustomer" time="0.216" result="Pass" />
     </collection>
   </assembly>
   <assembly name="81008 LookupValue Report" test-framework="PS Test Runner" run-date="2022-05-26" run-time="09:13:24" total="1" passed="1" failed="0" skipped="0" time="0.173">
     <collection name="LookupValue Report" total="1" passed="1" failed="0" skipped="0" time="0.173" Skipped="0">
       <test name="LookupValue Report:TestLookupValueShowsOnCustomerListReport" method="TestLookupValueShowsOnCustomerListReport" time="0.173" result="Pass" />
     </collection>
   </assembly>
   <assembly name="81009 LookupValue Report 2" test-framework="PS Test Runner" run-date="2022-05-26" run-time="09:13:27" total="1" passed="1" failed="0" skipped="0" time="0.22">
     <collection name="LookupValue Report 2" total="1" passed="1" failed="0" skipped="0" time="0.22" Skipped="0">
       <test name="LookupValue Report 2:TestLookupValueShowsOnStandardCustomerListReport" method="TestLookupValueShowsOnStandardCustomerListReport" time="0.22" result="Pass" />
     </collection>
   </assembly>
   <assembly name="81020 LookupValue Permissions" test-framework="PS Test Runner" run-date="2022-05-26" run-time="09:13:29" total="14" passed="14" failed="0" skipped="0" time="0.677">
     <collection name="LookupValue Permissions" total="14" passed="14" failed="0" skipped="0" time="0.677" Skipped="0">
       <test name="LookupValue Permissions:CreateLookupValueWithoutPermissions" method="CreateLookupValueWithoutPermissions" time="0.02" result="Pass" />
       <test name="LookupValue Permissions:CreateLookupValueWithPermissions" method="CreateLookupValueWithPermissions" time="0" result="Pass" />
       <test name="LookupValue Permissions:ReadLookupValueWithoutPermissions" method="ReadLookupValueWithoutPermissions" time="0.014" result="Pass" />
       <test name="LookupValue Permissions:ReadLookupValueWithPermissions" method="ReadLookupValueWithPermissions" time="0" result="Pass" />
       <test name="LookupValue Permissions:ModifyLookupValueWithoutPermissions" method="ModifyLookupValueWithoutPermissions" time="0.016" result="Pass" />
       <test name="LookupValue Permissions:ModifyLookupValueWithPermissions" method="ModifyLookupValueWithPermissions" time="0" result="Pass" />
       <test name="LookupValue Permissions:DeleteLookupValueWithoutPermissions" method="DeleteLookupValueWithoutPermissions" time="0.017" result="Pass" />
       <test name="LookupValue Permissions:DeleteLookupValueWithPermissions" method="DeleteLookupValueWithPermissions" time="0" result="Pass" />
       <test name="LookupValue Permissions:OpenLookupValuesPageWithoutPermissions" method="OpenLookupValuesPageWithoutPermissions" time="0.017" result="Pass" />
       <test name="LookupValue Permissions:OpenLookupValuesPageWithPermissions" method="OpenLookupValuesPageWithPermissions" time="0.013" result="Pass" />
       <test name="LookupValue Permissions:CheckLookupValueOnCustomerCardWithoutPermissions" method="CheckLookupValueOnCustomerCardWithoutPermissions" time="0.207" result="Pass" />
       <test name="LookupValue Permissions:CheckLookupValueOnCustomerCardWithPermissions" method="CheckLookupValueOnCustomerCardWithPermissions" time="0.153" result="Pass" />
       <test name="LookupValue Permissions:CheckLookupValueOnCustomerListWithoutPermissions" method="CheckLookupValueOnCustomerListWithoutPermissions" time="0.11" result="Pass" />
       <test name="LookupValue Permissions:CheckLookupValueOnCustomerListWithPermissions" method="CheckLookupValueOnCustomerListWithPermissions" time="0.11" result="Pass" />
     </collection>
   </assembly>
   <assembly name="81021 LookupValue Permissions 2" test-framework="PS Test Runner" run-date="2022-05-26" run-time="09:13:32" total="68" passed="68" failed="0" skipped="0" time="4.707">
     <collection name="LookupValue Permissions 2" total="68" passed="68" failed="0" skipped="0" time="4.707" Skipped="0">
       <test name="LookupValue Permissions 2:CheckLookupValueOnBlanketSalesOrderWithoutPermissions" method="CheckLookupValueOnBlanketSalesOrderWithoutPermissions" time="0.174" result="Pass" />
       <test name="LookupValue Permissions 2:CheckLookupValueOnBlanketSalesOrderWithPermissions" method="CheckLookupValueOnBlanketSalesOrderWithPermissions" time="0.11" result="Pass" />
       <test name="LookupValue Permissions 2:CheckLookupValueOnBlanketSalesOrdersWithoutPermissions" method="CheckLookupValueOnBlanketSalesOrdersWithoutPermissions" time="0.063" result="Pass" />
       <test name="LookupValue Permissions 2:CheckLookupValueOnBlanketSalesOrdersWithPermissions" method="CheckLookupValueOnBlanketSalesOrdersWithPermissions" time="0.064" result="Pass" />
       <test name="LookupValue Permissions 2:CheckLookupValueOnCustomerTemplateCardWithoutPermissions" method="CheckLookupValueOnCustomerTemplateCardWithoutPermissions" time="0.016" result="Pass" />
       <test name="LookupValue Permissions 2:CheckLookupValueOnCustomerTemplateCardWithPermissions" method="CheckLookupValueOnCustomerTemplateCardWithPermissions" time="0.014" result="Pass" />
       <test name="LookupValue Permissions 2:CheckLookupValueOnCustomerTemplateListWithoutPermissions" method="CheckLookupValueOnCustomerTemplateListWithoutPermissions" time="0.017" result="Pass" />
       <test name="LookupValue Permissions 2:CheckLookupValueOnCustomerTemplateListWithPermissions" method="CheckLookupValueOnCustomerTemplateListWithPermissions" time="0.013" result="Pass" />
       <test name="LookupValue Permissions 2:CheckLookupValueOnPostedReturnReceiptWithoutPermissions" method="CheckLookupValueOnPostedReturnReceiptWithoutPermissions" time="0.047" result="Pass" />
       <test name="LookupValue Permissions 2:CheckLookupValueOnPostedReturnReceiptWithPermissions" method="CheckLookupValueOnPostedReturnReceiptWithPermissions" time="0.033" result="Pass" />
       <test name="LookupValue Permissions 2:CheckLookupValueOnPostedReturnReceiptsWithoutPermissions" method="CheckLookupValueOnPostedReturnReceiptsWithoutPermissions" time="0.014" result="Pass" />
       <test name="LookupValue Permissions 2:CheckLookupValueOnPostedReturnReceiptsWithPermissions" method="CheckLookupValueOnPostedReturnReceiptsWithPermissions" time="0.017" result="Pass" />
       <test name="LookupValue Permissions 2:CheckLookupValueOnPostedSalesCreditMemoWithoutPermissions" method="CheckLookupValueOnPostedSalesCreditMemoWithoutPermissions" time="0.077" result="Pass" />
       <test name="LookupValue Permissions 2:CheckLookupValueOnPostedSalesCreditMemoWithPermissions" method="CheckLookupValueOnPostedSalesCreditMemoWithPermissions" time="0.08" result="Pass" />
       <test name="LookupValue Permissions 2:CheckLookupValueOnPostedSalesCreditMemosWithoutPermissions" method="CheckLookupValueOnPostedSalesCreditMemosWithoutPermissions" time="0.046" result="Pass" />
       <test name="LookupValue Permissions 2:CheckLookupValueOnPostedSalesCreditMemosWithPermissions" method="CheckLookupValueOnPostedSalesCreditMemosWithPermissions" time="0.047" result="Pass" />
       <test name="LookupValue Permissions 2:CheckLookupValueOnPostedSalesInvoiceWithoutPermissions" method="CheckLookupValueOnPostedSalesInvoiceWithoutPermissions" time="0.077" result="Pass" />
       <test name="LookupValue Permissions 2:CheckLookupValueOnPostedSalesInvoiceWithPermissions" method="CheckLookupValueOnPostedSalesInvoiceWithPermissions" time="0.08" result="Pass" />
       <test name="LookupValue Permissions 2:CheckLookupValueOnPostedSalesInvoicesWithoutPermissions" method="CheckLookupValueOnPostedSalesInvoicesWithoutPermissions" time="0.08" result="Pass" />
       <test name="LookupValue Permissions 2:CheckLookupValueOnPostedSalesInvoicesWithPermissions" method="CheckLookupValueOnPostedSalesInvoicesWithPermissions" time="0.06" result="Pass" />
       <test name="LookupValue Permissions 2:CheckLookupValueOnPostedSalesShipmentWithoutPermissions" method="CheckLookupValueOnPostedSalesShipmentWithoutPermissions" time="0.05" result="Pass" />
       <test name="LookupValue Permissions 2:CheckLookupValueOnPostedSalesShipmentWithPermissions" method="CheckLookupValueOnPostedSalesShipmentWithPermissions" time="0.046" result="Pass" />
       <test name="LookupValue Permissions 2:CheckLookupValueOnPostedSalesShipmentsWithoutPermissions" method="CheckLookupValueOnPostedSalesShipmentsWithoutPermissions" time="0.034" result="Pass" />
       <test name="LookupValue Permissions 2:CheckLookupValueOnPostedSalesShipmentsWithPermissions" method="CheckLookupValueOnPostedSalesShipmentsWithPermissions" time="0.03" result="Pass" />
       <test name="LookupValue Permissions 2:CheckLookupValueOnPostedWhseShipmentLinesWithoutPermissions" method="CheckLookupValueOnPostedWhseShipmentLinesWithoutPermissions" time="0.016" result="Pass" />
       <test name="LookupValue Permissions 2:CheckLookupValueOnPostedWhseShipmentLinesWithPermissions" method="CheckLookupValueOnPostedWhseShipmentLinesWithPermissions" time="0" result="Pass" />
       <test name="LookupValue Permissions 2:CheckLookupValueOnPstdWhseShipmentSubformWithoutPermissions" method="CheckLookupValueOnPstdWhseShipmentSubformWithoutPermissions" time="0.016" result="Pass" />
       <test name="LookupValue Permissions 2:CheckLookupValueOnPstdWhseShipmentSubformWithPermissions" method="CheckLookupValueOnPstdWhseShipmentSubformWithPermissions" time="0.014" result="Pass" />
       <test name="LookupValue Permissions 2:CheckLookupValueOnSalesCreditMemoWithoutPermissions" method="CheckLookupValueOnSalesCreditMemoWithoutPermissions" time="0.16" result="Pass" />
       <test name="LookupValue Permissions 2:CheckLookupValueOnSalesCreditMemoWithPermissions" method="CheckLookupValueOnSalesCreditMemoWithPermissions" time="0.14" result="Pass" />
       <test name="LookupValue Permissions 2:CheckLookupValueOnSalesCreditMemosWithoutPermissions" method="CheckLookupValueOnSalesCreditMemosWithoutPermissions" time="0.08" result="Pass" />
       <test name="LookupValue Permissions 2:CheckLookupValueOnSalesCreditMemosWithPermissions" method="CheckLookupValueOnSalesCreditMemosWithPermissions" time="0.063" result="Pass" />
       <test name="LookupValue Permissions 2:CheckLookupValueOnSalesInvoiceWithoutPermissions" method="CheckLookupValueOnSalesInvoiceWithoutPermissions" time="0.19" result="Pass" />
       <test name="LookupValue Permissions 2:CheckLookupValueOnSalesInvoiceWithPermissions" method="CheckLookupValueOnSalesInvoiceWithPermissions" time="0.174" result="Pass" />
       <test name="LookupValue Permissions 2:CheckLookupValueOnSalesInvoiceListWithoutPermissions" method="CheckLookupValueOnSalesInvoiceListWithoutPermissions" time="0.076" result="Pass" />
       <test name="LookupValue Permissions 2:CheckLookupValueOnSalesInvoiceListWithPermissions" method="CheckLookupValueOnSalesInvoiceListWithPermissions" time="0.08" result="Pass" />
       <test name="LookupValue Permissions 2:CheckLookupValueOnSalesListWithoutPermissions" method="CheckLookupValueOnSalesListWithoutPermissions" time="0.03" result="Pass" />
       <test name="LookupValue Permissions 2:CheckLookupValueOnSalesListWithPermissions" method="CheckLookupValueOnSalesListWithPermissions" time="0.017" result="Pass" />
       <test name="LookupValue Permissions 2:CheckLookupValueOnSalesListArchiveWithoutPermissions" method="CheckLookupValueOnSalesListArchiveWithoutPermissions" time="0.047" result="Pass" />
       <test name="LookupValue Permissions 2:CheckLookupValueOnSalesListArchiveWithPermissions" method="CheckLookupValueOnSalesListArchiveWithPermissions" time="0.016" result="Pass" />
       <test name="LookupValue Permissions 2:CheckLookupValueOnSalesOrderWithoutPermissions" method="CheckLookupValueOnSalesOrderWithoutPermissions" time="0.25" result="Pass" />
       <test name="LookupValue Permissions 2:CheckLookupValueOnSalesOrderWithPermissions" method="CheckLookupValueOnSalesOrderWithPermissions" time="0.204" result="Pass" />
       <test name="LookupValue Permissions 2:CheckLookupValueOnSalesOrderListWithoutPermissions" method="CheckLookupValueOnSalesOrderListWithoutPermissions" time="0.094" result="Pass" />
       <test name="LookupValue Permissions 2:CheckLookupValueOnSalesOrderListWithPermissions" method="CheckLookupValueOnSalesOrderListWithPermissions" time="0.094" result="Pass" />
       <test name="LookupValue Permissions 2:CheckLookupValueOnSalesOrderArchiveWithoutPermissions" method="CheckLookupValueOnSalesOrderArchiveWithoutPermissions" time="0.096" result="Pass" />
       <test name="LookupValue Permissions 2:CheckLookupValueOnSalesOrderArchiveWithPermissions" method="CheckLookupValueOnSalesOrderArchiveWithPermissions" time="0.063" result="Pass" />
       <test name="LookupValue Permissions 2:CheckLookupValueOnSalesOrderArchivesWithoutPermissions" method="CheckLookupValueOnSalesOrderArchivesWithoutPermissions" time="0.047" result="Pass" />
       <test name="LookupValue Permissions 2:CheckLookupValueOnSalesOrderArchivesWithPermissions" method="CheckLookupValueOnSalesOrderArchivesWithPermissions" time="0.016" result="Pass" />
       <test name="LookupValue Permissions 2:CheckLookupValueOnSalesQuoteWithoutPermissions" method="CheckLookupValueOnSalesQuoteWithoutPermissions" time="0.143" result="Pass" />
       <test name="LookupValue Permissions 2:CheckLookupValueOnSalesQuoteWithPermissions" method="CheckLookupValueOnSalesQuoteWithPermissions" time="0.14" result="Pass" />
       <test name="LookupValue Permissions 2:CheckLookupValueOnSalesQuotesWithoutPermissions" method="CheckLookupValueOnSalesQuotesWithoutPermissions" time="0.093" result="Pass" />
       <test name="LookupValue Permissions 2:CheckLookupValueOnSalesQuotesWithPermissions" method="CheckLookupValueOnSalesQuotesWithPermissions" time="0.077" result="Pass" />
       <test name="LookupValue Permissions 2:CheckLookupValueOnSalesQuoteArchiveWithoutPermissions" method="CheckLookupValueOnSalesQuoteArchiveWithoutPermissions" time="0.11" result="Pass" />
       <test name="LookupValue Permissions 2:CheckLookupValueOnSalesQuoteArchiveWithPermissions" method="CheckLookupValueOnSalesQuoteArchiveWithPermissions" time="0.063" result="Pass" />
       <test name="LookupValue Permissions 2:CheckLookupValueOnSalesQuoteArchivesWithoutPermissions" method="CheckLookupValueOnSalesQuoteArchivesWithoutPermissions" time="0.047" result="Pass" />
       <test name="LookupValue Permissions 2:CheckLookupValueOnSalesQuoteArchivesWithPermissions" method="CheckLookupValueOnSalesQuoteArchivesWithPermissions" time="0.03" result="Pass" />
       <test name="LookupValue Permissions 2:CheckLookupValueOnSalesReturnOrderWithoutPermissions" method="CheckLookupValueOnSalesReturnOrderWithoutPermissions" time="0.173" result="Pass" />
       <test name="LookupValue Permissions 2:CheckLookupValueOnSalesReturnOrderWithPermissions" method="CheckLookupValueOnSalesReturnOrderWithPermissions" time="0.157" result="Pass" />
       <test name="LookupValue Permissions 2:CheckLookupValueOnSalesReturnOrderListWithoutPermissions" method="CheckLookupValueOnSalesReturnOrderListWithoutPermissions" time="0.08" result="Pass" />
       <test name="LookupValue Permissions 2:CheckLookupValueOnSalesReturnOrderListWithPermissions" method="CheckLookupValueOnSalesReturnOrderListWithPermissions" time="0.063" result="Pass" />
       <test name="LookupValue Permissions 2:CheckLookupValueOnSalesReturnOrderArchiveWithoutPermissions" method="CheckLookupValueOnSalesReturnOrderArchiveWithoutPermissions" time="0.076" result="Pass" />
       <test name="LookupValue Permissions 2:CheckLookupValueOnSalesReturnOrderArchiveWithPermissions" method="CheckLookupValueOnSalesReturnOrderArchiveWithPermissions" time="0.064" result="Pass" />
       <test name="LookupValue Permissions 2:CheckLookupValueOnSalesRtrnOrderListArchWithoutPermissions" method="CheckLookupValueOnSalesRtrnOrderListArchWithoutPermissions" time="0.03" result="Pass" />
       <test name="LookupValue Permissions 2:CheckLookupValueOnSalesRtrnOrderListArchWithPermissions" method="CheckLookupValueOnSalesRtrnOrderListArchWithPermissions" time="0.03" result="Pass" />
       <test name="LookupValue Permissions 2:CheckLookupValueOnWhseShipmentLinesWithoutPermissions" method="CheckLookupValueOnWhseShipmentLinesWithoutPermissions" time="0.016" result="Pass" />
       <test name="LookupValue Permissions 2:CheckLookupValueOnWhseShipmentLinesWithPermissions" method="CheckLookupValueOnWhseShipmentLinesWithPermissions" time="0.017" result="Pass" />
       <test name="LookupValue Permissions 2:CheckLookupValueOnWhseShipmentSubformWithoutPermissions" method="CheckLookupValueOnWhseShipmentSubformWithoutPermissions" time="0.013" result="Pass" />
       <test name="LookupValue Permissions 2:CheckLookupValueOnWhseShipmentSubformWithPermissions" method="CheckLookupValueOnWhseShipmentSubformWithPermissions" time="0.013" result="Pass" />
     </collection>
   </assembly>
   <assembly name="81023 LookupValue UT Whse Shipment" test-framework="PS Test Runner" run-date="2022-05-26" run-time="09:13:40" total="1" passed="1" failed="0" skipped="0" time="0">
     <collection name="LookupValue UT Whse Shipment" total="1" passed="1" failed="0" skipped="0" time="0" Skipped="0">
       <test name="LookupValue UT Whse Shipment:CheckInheritLookupValueFromSalesHeader" method="CheckInheritLookupValueFromSalesHeader" time="0" result="Pass" />
     </collection>
   </assembly>
   <assembly name="81025 LookupValue UT Posting" test-framework="PS Test Runner" run-date="2022-05-26" run-time="09:13:43" total="4" passed="4" failed="0" skipped="0" time="0">
     <collection name="LookupValue UT Posting" total="4" passed="4" failed="0" skipped="0" time="0" Skipped="0">
       <test name="LookupValue UT Posting:CheckFailureCheckLookupvalueExistsOnSalesHeaderSalesPosting" method="CheckFailureCheckLookupvalueExistsOnSalesHeaderSalesPosting" time="0" result="Pass" />
       <test name="LookupValue UT Posting:CheckSuccessCheckLookupvalueExistsOnSalesHeaderSalesPosting" method="CheckSuccessCheckLookupvalueExistsOnSalesHeaderSalesPosting" time="0" result="Pass" />
       <test name="LookupValue UT Posting:CheckFailureCheckLookupvalueExistsOnSalesHeaderWhsePosting" method="CheckFailureCheckLookupvalueExistsOnSalesHeaderWhsePosting" time="0" result="Pass" />
       <test name="LookupValue UT Posting:CheckSuccessCheckLookupvalueExistsOnSalesHeaderWhsePosting" method="CheckSuccessCheckLookupvalueExistsOnSalesHeaderWhsePosting" time="0" result="Pass" />
     </collection>
   </assembly>
   <assembly name="81026 LookupValue UT Inheritance" test-framework="PS Test Runner" run-date="2022-05-26" run-time="09:13:47" total="2" passed="2" failed="0" skipped="0" time="0.013">
     <collection name="LookupValue UT Inheritance" total="2" passed="2" failed="0" skipped="0" time="0.013" Skipped="0">
       <test name="LookupValue UT Inheritance:CheckInheritLookupValueFromCustomer" method="CheckInheritLookupValueFromCustomer" time="0" result="Pass" />
       <test name="LookupValue UT Inheritance:CheckApplyLookupValueFromCustomerTemplateFromContact" method="CheckApplyLookupValueFromCustomerTemplateFromContact" time="0.013" result="Pass" />
     </collection>
   </assembly>
   <assembly name="81090 LookupValue APIV1" test-framework="PS Test Runner" run-date="2022-05-26" run-time="09:13:50" total="6" passed="0" failed="0" skipped="6" time="0">
     <collection name="LookupValue APIV1" total="6" passed="0" failed="0" skipped="6" time="0" Skipped="6">
       <test name="LookupValue APIV1:GetLookupValue" method="GetLookupValue" time="0" result="Skip" />
       <test name="LookupValue APIV1:DeleteLookupValue" method="DeleteLookupValue" time="0" result="Skip" />
       <test name="LookupValue APIV1:ModifyLookupValue" method="ModifyLookupValue" time="0" result="Skip" />
       <test name="LookupValue APIV1:ModifyLookupValueWithEmptyDescription" method="ModifyLookupValueWithEmptyDescription" time="0" result="Skip" />
       <test name="LookupValue APIV1:CreateLookupValue" method="CreateLookupValue" time="0" result="Skip" />
       <test name="LookupValue APIV1:CreateLookupValueWithEmptyDescription" method="CreateLookupValueWithEmptyDescription" time="0" result="Skip" />
     </collection>
   </assembly>
 </assemblies>
 
 *** Get XUnit Test file from [c:\Run\DevOps\TestResults.xml] to [C:\ADOAgents\Agent1\_work\22\s\TestResults.xml]
 
 *** Disconnect Docker session.
 *** Docker session removed.
 *** Running Tests Completed.
 *** Cleanup VSTS Environment: True
Finishing: ALOPS - Run TestSuite for API

Note

Codeunit LookupValue APIV1 (81090 ) is marked as Skipped in the log which is very strange. It is the codeunit that was already added to the API test suite by means of the install codenuit. This led me to think that this is related to the disabledtests parameter of the previous test task as this codeunit is in the DisabledTests.json.

Expected behavior

When a test suite is referenced in ALOpsAppTest and it has already been populated (in this case by an install codeunit) it should not re-populated, when a previous tests task has been created (with disablestests parameter set).

Additional context

I tried an alternative way using the testfilter parameter for ALOpsAppTest, but then an error is thrown in the log:

ALOpsAppTest task

- task: ALOpsAppTest@1
  displayName: 'ALOPS - Run TestSuite for API'
  inputs:
    usedocker: true
    import_testtoolkit: false
    import_action: 'Skip'
    testpage: '130455'
    testsuite: 'API'
    testfilter: '81090'
    failed_test_action: 'Ignore'
  continueOnError: true

ALOpsAppTest log (only relevant part)

*** Install Test-Tool extension for creating Test-Suites Finished
*** Set TCP Keep-Alive
*** Start TestSuite
*** Running TestSuite with authentication [NavUserPassword] with User [admin]
*** Run warm-up with page [130455]
*** Warm-up Client Context
*** Create Client Context
*** Add Tests to Default-TestSuite with filter [81090]
Show form 0001fd97-0000-0001-0c00-0000836bd2d2
Title: Command Line Test Tool Edit - Command Line Test Tool - API
Apply filter for Test-Codeunits: [81090]
##[error]Run-Test-Exception: Exception calling ".ctor" with "2" argument(s): "Value cannot be null.
Parameter name: logicalControl"
*** Get XUnit Test file from [] to [C:\ADOAgents\Agent1\_work\22\s\]
##[error]Cannot bind argument to parameter 'Path' because it is null.
Finishing: ALOPS - Run TestSuite for API
@lvanvugt
Copy link
Author

Hope this all makes sense. Was testing a lot and might have forgotten to add some details or have added too much.

@waldo1001
Copy link
Collaborator

waldo1001 commented May 30, 2022

We'll have a look - but since we don't have a repro, we'll only be able to look at the code, and hope we find anything that indicates this behavior..

@lvanvugt
Copy link
Author

lvanvugt commented May 30, 2022

We'll have a look - but since we don't have a repro, ...

I reckon you have tried to repro it. Could giving you access to this ADO project help you?

@waldo1001
Copy link
Collaborator

The testfilter is only there for the old way of working.. it doesn't work in the +v15 testability.

For the rest - I'd really like you to provide a (simple) test-project so I can see what is going on. Do know we are simply using default BC functionality.

We assume the DisabledTests.json are uploaded to the test-framework, which makes it re-used the next time as well.

How do you conclude that the second test-run is re-populate the suite? Where do you get that from the log?

@lvanvugt
Copy link
Author

lvanvugt commented Jun 1, 2022

Will try to get you a "(simple) test-project".

In what "format" do you want it, @waldo1001? Could it be a link to a GitHub repo (branch)?

@lvanvugt
Copy link
Author

lvanvugt commented Jun 1, 2022

The testfilter is only there for the old way of working.. it doesn't work in the +v15 testability.

Clear.

@lvanvugt
Copy link
Author

lvanvugt commented Jun 4, 2022

For the rest - I'd really like you to provide a (simple) test-project so I can see what is going on. Do know we are simply using default BC functionality.

Here you go: https://github.com/fluxxus-nl/ALOpsIssue520
This contains an abstract from the final code for my book and contains 2 test codeunits:

The project has a App and Test app (folder) and has two pipeline yaml files:

Both have two test runs in reverse order (compared to each other). azure-pipelines1.yml gives the expected result, while azure-pipelines2.yml gives the wrong results which this issue is reporting (above).

How do you conclude that the second test-run is re-populate the suite? Where do you get that from the log?

Simple: the test result tab shows for the first pipeline 9 successful tests (as expected) and the second shows 12 successful ones (as it has reloaded all tests in the preconfigured API test suite as described above). Next that letting the pipeline generate a database backup, downloading and installing it in my docker container shows that also:

  • test suite DEFAULT contains the 3 tests from LookupValueUTCustomer.Codeunit.al
  • test suite API contains all tests, both the 3 from LookupValueUTCustomer.Codeunit.al and the 6 from LookupValueAPIV1.Codeunit.al and have been disabled.

Result for azure-pipeline1.yml

image
A total of 9 tests have been (successfully) executed, being 6 from LookupValueAPIV1.Codeunit.al and 3 from LookupValueUTCustomer.Codeunit.al.

Result for azure-pipeline2.yml

image
A total of 12 tests have been loaded of which 6 have been (successfully) executed. 6 have been disabled, being 6 from LookupValueAPIV1.Codeunit.al per the content of DisabledTests.json. The 3 tests from LookupValueUTCustomer.Codeunit.al have been executed twice (as the were also loaded in the preconfigured API test suite.

@lvanvugt
Copy link
Author

lvanvugt commented Jun 4, 2022

@waldo1001, hope the above gives enough details for you.

@waldo1001
Copy link
Collaborator

Hi @lvanvugt ,

I did some research. And I can only conclude: everything works as intended - just not as expected ;-).

Now - we're obviously using the same (and only) entry point into running tests, which is basically the same as BCCH does: running a page in a client session.

So I simply reproduced the steps manually: published the apps to a bc environment, and started the test-tool the same way as you did.

What happens, using this tool:
you install the app, it creates the API test suite as intended
image
but when running the tests by extension-id, for some reason, the default application of the tool is going to add the tests to the already existing suite (which in this case is the API suite - resulting in:
image

THIS is the reason why your suite contains all tests.

Next, all the "disabledtests" does is simply again change the records, to skip the tests.

THIS is the reason why your second test-run will skip the tests again - because it has changed the data.

Now - as this interface to run tests is all we have, and since we're bound to the way it works - I would strongly suggest that you change the way you're running tests, simply by using multiple test-suites.

Suggestion:
create yet another install-codeunit to create an UT test suite and add that one codeunit in it

don't use "disabledtests.json", but simply run UT in one step and upload results
then run API testsuite and upload results

You'll be amazed how the results will look like.

Example:
Making sure you have isolated test suites:

codeunit 80097 "Install API TestSuite"
{
    Subtype = Install;

    trigger OnInstallAppPerCompany()
    begin
        SetupTestSuiteAPI();
        SetupTestSuiteUT();
    end;

    local procedure SetupTestSuiteAPI()
    var
        ALTestSuite: Record "AL Test Suite";
        TestSuiteMgt: Codeunit "Test Suite Mgt.";
        SuiteName: Code[10];
    begin
        SuiteName := 'API';

        if ALTestSuite.Get(SuiteName) then
            ALTestSuite.Delete(true);

        TestSuiteMgt.CreateTestSuite(SuiteName);
        ALTestSuite.Get(SuiteName);

        TestSuiteMgt.SelectTestMethodsByRange(ALTestSuite, StrSubstNo('%1', Codeunit::"LookupValue APIV1"));
        TestSuiteMgt.ChangeTestRunner(ALTestSuite, Codeunit::"Test Runner - Isol. Disabled");
    end;

    local procedure SetupTestSuiteUT()
    var
        ALTestSuite: Record "AL Test Suite";
        TestSuiteMgt: Codeunit "Test Suite Mgt.";
        SuiteName: Code[10];
    begin
        SuiteName := 'UT';

        if ALTestSuite.Get(SuiteName) then
            ALTestSuite.Delete(true);

        TestSuiteMgt.CreateTestSuite(SuiteName);
        ALTestSuite.Get(SuiteName);

        TestSuiteMgt.SelectTestMethodsByRange(ALTestSuite, StrSubstNo('%1', Codeunit::"LookupValue UT Customer"));
    end;
}
...
  - task: ALOpsAppTest@1
    displayName: "ALOPS - Run TestSuite for UT"
    inputs:
      usedocker: true
      import_testtoolkit: false
      import_action: "Skip"
      testpage: "130455"
      testsuite: "UT"
      failed_test_action: "Ignore"
      show_available_tests: true
    continueOnError: true

  - task: PublishTestResults@2
    displayName: "Publish Test Results **/TestResults.xml"
    inputs:
      testResultsFormat: XUnit
      testResultsFiles: "**/TestResults.xml"
      failTaskOnFailedTests: true
      testRunTitle: "BC Test Results: $(Build.BuildId)"

  - task: ALOpsAppTest@1
    displayName: "ALOPS - Run TestSuite for API"
    inputs:
      usedocker: true
      import_testtoolkit: false
      import_action: "Skip"
      testpage: "130455"
      testsuite: "API"
      failed_test_action: "Ignore"
      show_available_tests: true
    continueOnError: true

  - task: PublishTestResults@2
    displayName: "Publish Test Results **/TestResults.xml"
    inputs:
      testResultsFormat: XUnit
      testResultsFiles: "**/TestResults.xml"
      failTaskOnFailedTests: true
      testRunTitle: "BC Test Results: $(Build.BuildId)"
...

And you'll have a beautiful result in DevOps:
image

HOpe this helps.. .

@waldo1001 waldo1001 added question Further information is requested and removed investigate labels Jun 10, 2022
@waldo1001
Copy link
Collaborator

I'm closing this issue.
if you have other questions about it, please feel free to reopen it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants