Hello , Does anyone have any info on tools, techno...
# suitescript
h
Hello , Does anyone have any info on tools, technologies, frameworks, best practices that can be used to for unit testing, code coverage and CI for NetSuite development
s
It's difficult, there are some companies out there that have built unit testing frameworks out. Just google unit testing and NS, you will find a couple. Xcelero, Assertology, and ES Unit are the ones I've heard of (never used any of them)
c
If you really want to unit test suitescript correctly, then I would separate your business logic into non-netsuite method dependent functions and test those functions using whatever flavor of js testing framework you want
You can then just mock up your function inputs as if they came from netsuite and have at it.
s
Yeah, the main issue with that is I've found generally the issues with my code in NS are the use of the NS APIs/data retrieval steps in the code.
a
Define your goal when you mention unit testing, I had seen many people asking about unit testing when they really want to know about performance which is a different monster specially with NetSuite. Optimization in NetSuite is almost no-needed or a waste of time because your code would be transpile or transcompile to Java for all server side scripts and therefore you could be losing any optimization right there.
h
@alien4u when I say "Unit testing" I mean exactly that. If I want to perf test, I would literally mention it the same goes for Optimization 🙂
👍 1