Skip to main content

Notifications

Announcements

No record found.

Business Central forum
Answered

Test Automation

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,023 Moderator 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,023 Moderator 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,023 Moderator 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,023 Moderator 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

Quick Links

Anton Venter – Community Spotlight

Kudos to our October Community Star of the month!

Announcing Our 2024 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Dynamics 365 Community Newsletter - September 2024

Check out the latest community news

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 290,556 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 228,625 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans