nodejs-integration-tests-best-practices icon indicating copy to clipboard operation
nodejs-integration-tests-best-practices copied to clipboard

Kicking off 🎉

Open goldbergyoni opened this issue 5 years ago • 17 comments

@jhenaoz @mikicho @Thormod

I'm excited to kick-off this project which I find to be super-important. We all know how tricky is perfecting the environment and the integration tests themselves. This can be a great source for many and our playground to master this technique. We will receive feedback and validation from the community and there is no better way for self-improvement.

I suggest the following workflow:

  1. Put a meeting on the calendar for next week. It's always nice to see at least once the people you work with. When might be a good time?
  2. Pick your favorite feature below to nurture: Push it in your convenient time, share your thoughts and progress in our meeting. This OSS world so obviously progress on your own pace whether this means just reading 5min about this feature or coding 100 lines of code. Accomplish this feature in 3 days or one year. Dedicate to this lib 5 min/month or 20 hours, whatever works for you!

List of features

  • Tests against API
  • Isolating 3rd party services
  • Stubbing the backend behavior to simulate corner cases
  • Authentication/Login ✨
  • Database setup with speedy RAM folder that supports both Linux, Mac & Windows ✨
  • Local env setup for speedy and convenient tests ✨
  • Documentation based contract tests (validating Swagger correctness) ✨
  • Consumer-driven contract tests (with PACT) ✨
  • Tests with message queues ✨
  • Schema migration and seeding ✨
  • Data seeding ✨
  • Data cleanup ✨
  • Error handling tests ✨
  • Testing for proper logging and metrics ✨
  • Debug configuration and other dev tooling ✨
  • Frameworks examples: Serverless, Nest, Fastify, Koa ✨

goldbergyoni avatar Sep 08 '20 07:09 goldbergyoni

Thanks @goldbergyoni! I'm available next Sunday - Thursday. I'm interested in the following topics:

  1. Tests against API
  2. Isolating 3rd party services
  3. Database setup with speedy RAM folder

I don't want to take all of them now of course because each one of them is a big topic, but I'll start with tests against API.

mikicho avatar Sep 08 '20 08:09 mikicho

@mikicho Cool, let's schedule once @jhenaoz @Thormod share their availability. We can also meet the week after if someone's calendar is busy.

Note that 'Tests against API' is the basics which is probably obvious to most people, it already exists in our skeleton example (which we can improve). Maybe let's start with the things that are harder like DB RAM drive or whatever appeals to you.

goldbergyoni avatar Sep 09 '20 14:09 goldbergyoni

friday morning COT?

El mié., 9 sept. 2020 a las 9:29, Yoni Goldberg ([email protected]) escribió:

@mikicho https://github.com/mikicho Cool, let's schedule once @jhenaoz https://github.com/jhenaoz @Thormod https://github.com/Thormod share their availability. We can also meet the week after if someone's calendar is busy.

Note that 'Tests against API' is the basics which is probably obvious to most people, it already exists in our skeleton example (which we can improve). Maybe let's start with the things that are harder like DB RAM drive or whatever appeals to you.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/testjavascript/nodejs-integration-test-practices-and-examples/issues/1#issuecomment-689600372, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAPVXRUD5ZJ6WPCYU2CIZFDSE6GMPANCNFSM4Q7SAZVQ .

-- Juan David Henao Zapata Senior Software Developer / Teach Coach

jhenaoz avatar Sep 09 '20 15:09 jhenaoz

@mikicho COT === Colombian times

goldbergyoni avatar Sep 09 '20 19:09 goldbergyoni

I'll handle first the authentication challenge - How do we test against API that is behind some authentication layer.

About meeting dates - Next Friday is new years eve here, how about Saturday 19th, Sunday 20th, Monday 21th or Friday 25th?

goldbergyoni avatar Sep 11 '20 06:09 goldbergyoni

I'm OK with 21th and 25th

mikicho avatar Sep 11 '20 06:09 mikicho

@goldbergyoni what about smoke tests (CD tests) and blue/green deployments challenges (from tests POV), not sure they are in the scope of this repo tho.

mikicho avatar Sep 12 '20 05:09 mikicho

@mikicho I would separate between the obvious DNA of this repo- integration tests and their setup- and other partially related activities on the pipeline. Let's focus on the DNA first. After sometime, we may broaden and tackle deployment and others, but let's stick first to the DNA?

In other words, without login and MQ connection/stubbing, one can't test at all. Let's help him (and ourselves) start with the basics.

I'm not sure whether this makes sense? Maybe @jhenaoz @Thormod wanna chime-in?

goldbergyoni avatar Sep 13 '20 13:09 goldbergyoni

I'm agree with @goldbergyoni, let's start with the basics. BTW, I'm available wherever day when all can.

Thormod avatar Sep 14 '20 02:09 Thormod

@jhenaoz @Thormod Can you suggest some availability spots for a meeting next week? How about picking a topic from the list that you push? This way we're in-sync and avoid overlaps

goldbergyoni avatar Sep 17 '20 11:09 goldbergyoni

Yes, in the morning for us between 10-12 COT we are usually free. On Sep 17, 2020, 6:52 AM -0500, Yoni Goldberg [email protected], wrote:

@jhenaoz @Thormod Can you suggest some availability spots for a meeting next week? How about picking a topic from the list that you push? This way we're in-sync and avoid overlaps — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.

jhenaoz avatar Sep 17 '20 13:09 jhenaoz

@jhenaoz @Thormod @mikicho So I'm sending an invite for Friday 9am COT/5pm IDT?

goldbergyoni avatar Sep 22 '20 12:09 goldbergyoni

Yes sure

jhenaoz avatar Sep 23 '20 02:09 jhenaoz

Proposed agenda for today:

  • Introduce each other - 10 min
  • DNA discussion: What do we aim to solve - 15 min
  • Chosen features: Each speaks about his chosen feature - 20 min
  • What's next - 10 min

goldbergyoni avatar Sep 25 '20 08:09 goldbergyoni

@jhenaoz @Thormod @mikicho Thanks for the fruitful meeting, I'll share action items soon 🙏

goldbergyoni avatar Sep 28 '20 20:09 goldbergyoni

@Thormod @jhenaoz @mikicho I created the post-meeting action items.

Which of the below is better:

(A) - Let's aim for some specific date, e.g. 15/11, where we have some basic content setup? We are pretty close to this, not much work. This is obviously not a dead-line, just some recommended date to aim for (B) - Let's do a test party online, block 3 hours over some weekend and work together. This is great for busy people who hardly find time during the routine (C) - Neither, let's just work asynchronously at our own pace. Feel free to choose C'

p.s. Repo name discussion: https://github.com/testjavascript/the-art-of-integration-tests/issues/11

goldbergyoni avatar Oct 11 '20 06:10 goldbergyoni

@goldbergyoni I'm ok with A

mikicho avatar Oct 11 '20 17:10 mikicho