I’m quite new to the ERPNext universe. I’ve recently done an implementation for a small business. I wrote a few client scripts and server scripts. After that, all the testing was done manually, which took a lot of time since tests need to be repeated every time I change something in the settings or in the scripts.
So because of this, I was wondering how people actually do testing in a professional team. Is it common for teams to write these tests using Selenium rather than using the REST API directly?
In my scenario, I have two companies set up on the same ERPNext site and there are inter-company transactions and movement of inventory items, and so when certain DocType is created in Company #1, a another DocType is created in Company #2, which is implemented as a Server Script. The ERPNext source code itself is unchanged and there are no custom apps installed.
I see that ERPNext is using Cypress internally for UI tests, although it is not very clear to me how it works if the ERPNext instance is running on a remote server and I want the tests to run on my local machine. I’m also not so sure if this is suitable for testing Funtional Implementation projects or if it is only for development projects.
I could definitely be mistaken, but I don’t believe that Cypress is designed to do local testing on remote servers out of the box. For both Cypress and unittest, it’s really oriented around development and source management/ci. (I’m not familiar with Barista, but it looks really interesting.)
I copied the cypress folder to my local system and set the remote instance’s url as the baseUrl in cypress and I’m able to run my own tests without installing anything on the remote servers.