Skip to main content

Notifications

Small and medium business | Business Central, N...
Answered

Test Automation

(0) ShareShare
ReportReport
Posted on by 27

Hello,

I am trying to create a test automation project for my app,

I followed the manual, installed business central ver.21 sandbox on docker,

however I am unable to reference test libraries. Here is my app.json:

{
  "id": "e6010585-50b3-4e3a-8c9a-65c9fd591a0f",
  "name": "GeoLocalizationTest",
  "publisher": "Default publisher",
  "version": "1.0.0.0",
  "brief": "",
  "description": "",
  "privacyStatement": "",
  "EULA": "",
  "help": "",
  "url": "",
  "logo": "",
  "dependencies": [
    {
      "id": "99aa9ff9-ec49-40ca-9fa0-5726b66419fa",
      "name": "GeoLocalization",
      "publisher": "BIT",
      "version": "1.0.0.0"
    }
  ],
  "test": "21.0.0.0",
  "screenshots": [],
  "platform": "1.0.0.0",
  "application": "21.0.0.0",
  "idRanges": [
    {
      "from": 71372600,
      "to": 71372600
    }
  ],
  "resourceExposurePolicy": {
    "allowDebugging": true,
    "allowDownloadingSource": true,
    "includeSourceInSymbolFile": true
  },
  "runtime": "10.0",
  "features": [
    "NoImplicitWith"
  ]
}
here is the error:
The request for path /BC/dev/packages?publisher=Microsoft&appName=Test&versionText=21.0.0.0&appId=00000000-0000-0000-0000-000000000000&tenant=default failed with code NotFound. Reason: No published package matches the provided arguments.
  • Suggested answer
    Nitin Verma Profile Picture
    Nitin Verma 21,091 Super User 2024 Season 1 on at
    RE: Test Automation

    Thanks for the update.

  • Verified answer
    Davit Makharadze Profile Picture
    Davit Makharadze 27 on at
    RE: Test Automation

    So I found this:

    "For those who come from a C/AL based version (per-BC15) note that the test keyword in the app.json no longer applies. To reference any of the test related apps (see list above) you need to explicitly reference them as dependencies. You can copy the relevant dependency definition line in the code block above and past that into your dependencies collection in your app.json."

    Link: www.fluxxus.nl/.../

    Apparently "test" property only worked in the versions that still had development environment.

    Now you have to add every test library you need in the dependencies.

  • Davit Makharadze Profile Picture
    Davit Makharadze 27 on at
    RE: Test Automation

    Unfortunately, that's not the problem. Every dependency is found successfully except the test.

  • Marco Mels Profile Picture
    Marco Mels on at
    RE: Test Automation

    Hello,

    I assume it cannot find this dependency:

    GeoLocalization

    Hope it helps.

  • Davit Makharadze Profile Picture
    Davit Makharadze 27 on at
    RE: Test Automation

    I am using version 21, I had specified that version everywhere and it was still unable to locate the test library, even though the test extensions are installed in the business central and I included "-includeTestToolkit" while installing BCContainer.

  • Nitin Verma Profile Picture
    Nitin Verma 21,091 Super User 2024 Season 1 on at
    RE: Test Automation

    Ok, then check which version you are using and put the same version no. in your app.json file and then try again.

  • Davit Makharadze Profile Picture
    Davit Makharadze 27 on at
    RE: Test Automation

    Yes, I tried exactly that and it does not work.

    Also, I need test automation for business central version 21 and not 20.

  • Nitin Verma Profile Picture
    Nitin Verma 21,091 Super User 2024 Season 1 on at
    RE: Test Automation

    "test": "20.0.0.0",

     "screenshots": [],

     "platform": "1.0.0.0",

     "application": "20.0.0.0",

     "idRanges": [

       {

         "from": 71372600,

         "to": 71372600

       }

     ],

     "resourceExposurePolicy": {

       "allowDebugging": true,

       "allowDownloadingSource": true,

       "includeSourceInSymbolFile": true

     },

     "runtime": "9.0",

  • Davit Makharadze Profile Picture
    Davit Makharadze 27 on at
    RE: Test Automation

    I already did and it did not work.

  • Nitin Verma Profile Picture
    Nitin Verma 21,091 Super User 2024 Season 1 on at
    RE: Test Automation

    change

    "runtime": "9.0"

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

News and Announcements

Announcing Category Subscriptions!

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Verified Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,359 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,370 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans