Hey all, does anyone have a recommended set of too...
# suitescript
m
Hey all, does anyone have a recommended set of tools or best practices for test automation of SuiteScript 2.x "Server Side" scripts? Primarily, we are looking to create and run test automation for one or all of: libraries, UserEvents and MapReduce scripts.
s
NS has some rudimentary examples. Maybe @battk knows a link for you
If you're using NFT, writing unit tests is for scripts manipulating records is easier since you can use basic object stubs for testing rather than mocking tons of NS record apis.
If not, be prepared to have fun with your mocking library of choice.
I'm talking about unit testing above (i.e. mocking out all dependencies)
m
Dumb question, what is "NFT" in this context? I only know NFT as Non-fungible tokens. We are using visual studio as our IDE.
s
for integration or E2E testing it's a different story
m
We're more concerned with functional testing.
s
'functional' is ambiguous, unless you mean higher level functionality (aka integration/e2e)
m
Wow, thanks for the pointer on NFT! I was not aware of that. In regards to 'functional testing', to clarify, we have quite a number of SS 2.x library calls which we'd like a test suite for. So, a test tool which can easily mock data and test each of those functions would be a fantastic starting point.
s
What NS uses for their example (and so do we, predating NS's examples 🙂 ) is
jest
m
👍 I'll check that out, and, NS's examples. Apologies for the apparent need to rtfm.
Thank you so much for the suggestions, @Shawn Talbert