Moving to nodejs to test a web application?
Laycee last edited by
Situation: We are currently running thousands of functional tests(FT) to test a web application. FTs are written in JVM based programming languages: Java, scala, and groovy with the help of cucumber, gherkin, and selenium. There are many Jenkins job created to run all the FTs on a different server. Jenkins job takes 3-4 hours. they fail many times with some unknown exceptions or timeout. At last, most of the builds are red all the time.
I was wondering if switching to Node.js can improve the situation.
Brittle, Flickring tests is not a problem of the programming language used. It is about how the tests are coded/designed.
Another programming language will not make it faster probably, designing tests to be run in parallel is.
- Make a list of flaky tests
- Record info, logs, screenshots, memory dumps, etc
- Fix or remove them!
Sometimes tests fail due to infrastructure issues, you could try a re-run strategy. E.g. rerun all failed tests, then rerun all failed tests again. The set of failed tests should get smaller and smaller. After three runs probably it is a real defect.
Interesting read: https://hackernoon.com/flaky-tests-a-war-that-never-ends-9aa32fdef359