Open goldbergyoni opened 3 years ago
The homepage readme moved here: https://github.com/testjavascript/integration-tests-a-z/tree/awesome-homepage
Before I spend a long time writing 40 best practice, LMK if you have thoughts on:
Wow, this is amazing!!! Kudos!
Integration Tests Best Practices
, this is a broad topic already IMO and if we want to add other topics we can create dedicated repo.I just don't understand The golden principles
part. what it should contain?
Hi! Just a couple of thoughts with no specific order here:
testable-nest
, testable-express
etc..Again, just random thoughts here.
@silicakes Gold stuff here. First few questions:
Debugging flaky tests and practices to avoid it
Tests should not be flaky, all of these guidelines together are meant to yield great non-flaky tests. Are you referring to specific situation? Why would tests by flaky?
Performance optimization of large test-bases [ expanding on 'optimize speed' ]: Parallel execution, remote execution etc..
Kindly elaborate on remote execution?
Boilerplates for the popular CLIs? i.e testable-nest, testable-express etc..
Sounds interesting, can you share few more works on this idea?
The repos name can contain 'Awesome'
Awesome libs === Links aggregators. We show here a full app with many code and non-trivial practices, is this doing justice with us to put us in the same basket with these libs?
Tests should not be flaky, all of these guidelines together are meant to yield great non-flaky tests. Are you referring to specific situation? Why would tests by flaky?
That's right, however sometimes you'll get a flaky test for not adhering to these principles and it could be nice to show a debugging workflow to discover the cause
Kindly elaborate on remote execution?
Executing tests over CI, remote machines, executing just a subset of tests during development etc. Basically everything that revolves around providing feedback as fast as possible.
Boilerplates for the popular CLIs
The same way you have templates for various frameworks and tools (i.e npx create-react-app myApp --template typescript
), you can have a couple to set up the initial testing configuration and bootstrap
Awesome libs
I agree, we're not going to aggregate links, disregard that. (We might create an aggregation for testing libraries and tools though, which can be a nice appendix for these practices)
Example here: https://github.com/testjavascript/integration-tests-a-z/issues/43
YO, Two strategic topics:
Repo name and concept - Seems like we're going with the repo name: 'Integration Tests Best Practices', Any counter thoughts? Maybe 'Node.js Tests Best Practices' which makes it even more generic, opens the door for more topics but also less focused?
Best practices sketch - I'm including here a first draft of best practices idea and categorization (there will be more and each will include a longer explanation with code example), does this feel like the right taxonomy and will end in interesting content?
The golden principles
Super simple, declarative and short (7 loc) tests
Web server setup (3)
Infrastructure setup (6)
Basic tests - (5)
Tests isolation (8)
Dealing with data (7)
Error handling and metrics
Message queue related testing (8)
Workflow (6)
Other ideas
More will come here. Suggest more?