Hi there,
Together with @janis91 we have been working on a detailed overview of Node.js Testing best practices. We have published them in a blogpost https://blog.novatec-gmbh.de/modern-microservice-testing-concept-real-world-example/ and we provide a showcase project in github https://github.com/nt-ca-aqe/blog-microservices-testing-nodejs-typescript. Would that be interesting for you? I think especially for integration/component testing and contract testing, one does not find many examples.
Let us know!
Cheers,
Antoniya
@antoniq @janis91
Welcome.
This is very interesting. And very important. I added your post to my learning queue and will read soon. There are also some other important JS testing type that are not covered, also have some post waiting for finalization for many time (e.g. property based testing, chaos testing, etc)
Would you be able to format some of the content as bullets in our testing section?
Hi @i0natan ,
Sure, let us know once you have read the blogpost content. We have followed the testing types defined in the modern Agile Testing Pyramid.
Cheers,
Antoniya
@antoniq, sure thing, plan to do it over the weekend
@antoniq @janis91
Took some time but finally found the time, read the article and enjoyed it. See below few remarks and a description of how we typically collaborate with writters.
Thoughts that pop to my mind during the read
Our typical topical collaboration model
We might collaborate the same way we craft the security best practices section: we write ~20 comprehensive bullets with examples and quotes, usually this takes some time and investment, then we publish them as a medium.com article that links to this repo.
Benefits to us: (1) We learn, research, dive and write about testing. (2) Our articles usually gain mass traction (our latest article was 2nd most read node article on medium in July + featured article of Node weekly, etc) - we get a nice outreach and impact
Thoughts?
Hi @i0natan ,
Thank you for taking your time to have a look! We will try to answer your questions:
Regarding collaboration - your suggestion sounds very interesting.
Currently, we cannot say however how much time we can invest and when. Feel free to start. It could be that in 2-3 month we have more time to collaborate on the practices.
Cheers,
Antoniya and Janis
@antoniq
"Integration testing focuses on the interaction with only one external component. Furthermore, scenario selection plays a key role - one does not need to test everything once again in the component test"
Can you provide a concurrent and real-world example where this might worth the effort?
Hi @i0natan ,
I am back from vacation and have time now to look at your question. I am not sure that I get your question completely - is it about the diff between integration and component testing?
@antoniq Yeah, my question should be clarified. But first, appreciate if you can clarify the following:
Integration testing means different things, Fowler for example, defines 3 types of them:
To which of the above options did you post refer?
In connection to the article, we are using Narrow integration testing (2). Component testing covers more paths, but still does not use real running services.
@antoniq Do you see any compelling reason to use narrow integration testing (e.g. 2 layers/classes under test) instead of a component test (the entire flow)?
My view is - if you already pay the integration price (setup an environment which includes DB), then go all the way and check the component * behavior, from the perspective of the *user/client, by simulating native system flows without mocking anything but external services. As a bonus coverage will also get higher. Integration test on the other end, will force to simulate some artificial scenario (e.g. test two layers) and demand more effort for less value
Hello there! 👋
This issue has gone silent. Eerily silent. ⏳
We currently close issues after 100 days of inactivity. It has been 90 days since the last update here.
If needed, you can keep it open by replying here.
Thanks for being a part of the Node.js Best Practices community! 💚
Most helpful comment
Hi @i0natan ,
Thank you for taking your time to have a look! We will try to answer your questions:
Regarding collaboration - your suggestion sounds very interesting.
Currently, we cannot say however how much time we can invest and when. Feel free to start. It could be that in 2-3 month we have more time to collaborate on the practices.
Cheers,
Antoniya and Janis