Aaron Beehoo, one of our ISV Technical Account Managers, has created some in-depth development materials related to the Acumatica Test SDK to help you overcome many of the challenges you may have writing your tests.
To learn more:
We hope this helps.
Getting in and starting to use the TestSDK, running into a few issues.
First question how we can debug into the code. Hit an error “Cannot locate xxxx.cs File”. Why is it failing? At best we only get some generic unactionable and unusable error message, where is the source so we can debug and see?
Next, why are all the base, unmodified screens not provided as source within the TestSDK itself already? They had to be generated for creating the GeneratedWrappers.Accumatica anyway?
The documentation for running the ClassGenerator.exe seems at best rather poor and incomplete. Examples for simple classes but what, why, and how to get pages with parameters? Doesn’t leave a lot of confidence this is ready for prime time to see even one of you own employees or community contributors mentioning a problem running the ClassGenerator.exe renders your website in a corrupted unusable state and allowed to ship. Leave a poor impression if this is the level of quality and testing going into the product?
Next, given we need to submit our code for review to verify we work for plugins we need ship… Great, should go both ways and would assert your basic verification tests, hmm what better example to demo the TestSDK, seems like a win/win for all? How else do we have confidence the TestSDK doesn’t have issue itself? Example, right now, i’m trying to automate a screen which is failing. The screen has no modifications, trying to debug and see why is it failing, oh ya: Error “Cannot find xxxx.cs” file. How is this useful?
How do we have any confidence the TestSDK is usable in the current state?
Thank you for your feedback, I had created the git repo above to assist new developers in getting over the few common difficulties in getting started with Test SDK. All your questions and concerns have been answered inside the git project we released https://github.com/Acumatica/Test-SDK-Starter-Guide
We have had many external partners who have had great success building their tests for 22r1 Certification in the last few months.
Excellent answer that answered nothing…
As for the logs, nope they aren’t showing up, all folders exists, no output is in them. Even better why not allow a custom logger, and optionally display in the console windows? From what is can tell you a generating html files? Sorry, might be nice for some, would really prefer all logs show up in one place, change the file names, most often just need the details i.e. “No such element findElement By.Xpath(“//eh”)”.
I’ve read through most anything i could get my hands on, enough to have seen your comment Aaron about the ClassWrapper.exe breaking the web sites…
There is nothing answering how to debug and get into the code...
I just updated the repo, It should resolve the cannot find xxxxx.cs build issue you were experiencing. If not please create a new forum topic with more details.
I agree with the ClassGenerator feedback, we do have an open ticket to resolve it.
Sorry, did you notice clicking on the link provided “https://github.com/Acumatica/Test-SDK-Starter-Guide” results in a 404 page not found? Even searching Github for “Test-SDK-Starter-Guide” produces 0 results and searching for just “TestSDK” 1 result for Patrick Chan example. It is in a private repro? Does nothing then to help.
My point about the “cannot file xxxxx.cs file has more to do with debugging my tests when using the TestSDK. I might of added some confusion, did ask about 3 or 4 separate issues.
My main question is how to get my test working across all supported Acumatica versions we need to support. Seems next to impossible. Only after rolling back to an early build of of 2021 R2 (21.200.0145 -- very early build in 21 R2) was able to get my tests working. Updating to any build after that version they all fail. Would assume calling into the TestSDK as it is paired with each version of Acumatica, there shouldn’t be mismatched screen identifiers or if a control is selected differently, that is the responsibility of TestSDK code? A number of the places my code is failing are on drop-down box controls when attempting to selecting a value. Can get control just fine, examine it in the debugger but attempting to set the dropdown box value “ctrl.Select(“ListValue”) nothing is selected or the app crashes.
Attempting to debug and trying to fix what is happening, without sources and/or detail logging, with the added joy of my manager asking when are you going to have this fixed? To be clear attempting to debug on the “ctrl.Select()” attempting to debug into that… “file xxxx.cs could not be found.”
It sounds like you need to update your nuget dependencies & regenerate the wrappers for the specific version - ensure the 2 config files are properly set up in the new testSDK folder & the launchSettings.json is updated.
Each Version of Acumatica needs versioned wrapper files for modified screens(extensions files don’t change), and you can use the nuget package GeneratedWrappers.Acumatica to find the fresh wrappers for unmodified screens.
Please reference the readme.txt for detailed instructions on the verson upgrade process
An extra tip to install 2 versions of Acumatica on the same PC:
Use the command line to extract the .msi
msiexec /a C:\AcumaticaInstallers\22.105.0031.msi /qb targetdir=C:\AcumaticaInstallers\22.105.0031