Are so-called system tests and end-to-end tests the same?
testing-concept-refactor-tests
testing-concept-seek-edge-cases
testing-concept-testing-forces-reflection
testing-concept-reduction-in-cognitive-load
testing-concept-view-model-tests
testing-concept-push-variation-into-faster-tests
testing-concept-use-global-var-for-logging
testing-concept-do-not-to-leave-the-editor
testing-concept-exclusive-tests
testing-concept-outside-in-testing
testing-concept-clean-architecture
testing-concept-isolated-tests
testing-concept-positive-design-pressure
testing-concept-testing-intra-organisation-microservices
testing-concept-microservice-testing
testing-concept-class-to-test-file-convention
testing-concept-distributed-testing
testing-concept-pure-functions-aid-testability
testing-concept-binary-test-suite
testing-concept-test-fragility
testing-concept-the-dangers-of-negative-assertions
testing-concept-write-test-from-bottom-up
testing-concept-unit-testing-business-logic
testing-concept-mocks-are-design-canaries
testing-concept-consumer-driven-contract-testing
testing-concept-designing-code-for-tests
testing-concept-attribute-testing
testing-concept-throwaway-tests
testing-concept-reduced-need-for-debuggers
testing-concept-refactoring-incrementalism
testing-concept-get-object-state-by-watching-behavior
testing-concept-test-setup-gives-insight-into-code
testing-concept-preparatory-refactoring
testing-concept-bounded-integration-tests
testing-concept-tests-should-be-self-documenting
testing-concept-verifying-doubles
testing-concept-testing-changes-how-you-code
testing-concept-redundant-coverage
testing-concept-test-case-reduction
testing-concept-type-checking-reduces-need-for-testing
testing-concept-testing-to-a-level-of-confidence
testing-concept-white-box-testing
testing-concept-devaluing-tests-with-too-much-setup
testing-concept-writing-tests-based-on-ease
testing-concept-slow-test-suite
testing-concept-mutation-testing
testing-concept-calling-your-shot
testing-concept-flaky-tests-are-worse-than-no-tests
testing-concept-fewer-end-to-end-tests
testing-concept-testing-random-code
testing-concept-tests-are-code-too
testing-concept-do-not-mock-what-you-do-not-own
testing-concept-make-adapter-for-external-services
testing-concept-parallel-tests
testing-concept-parameterized-tests
testing-concept-generative-tests
testing-concept-tests-hold-context
testing-concept-little-islands-of-safety
testing-concept-regression-test-selection
testing-concept-running-only-tests-that-are-likely-to-fail
testing-concept-red-green-refactor
testing-concept-the-happy-zone
testing-concept-testing-as-spiking
testing-concept-characterization-tests
testing-concept-approval-tests
testing-concept-gold-master-tests
testing-concept-explicitly-switching-to-refactoring
testing-concept-prefer-local-testing-to-ci
testing-concept-four-phase-test
testing-concept-consumer-driven-contract-tests
testing-concept-private-method-testing
testing-concept-delta-coverage
testing-concept-test-units-not-classes
testing-concept-writing-tests-is-hard
testing-concept-tests-are-client-code
testing-concept-scaffolding-tests
testing-concept-one-assertion-per-test
testing-concept-multiple-assertions-per-test
testing-concept-pull-out-modules-or-services
testing-concept-stages-of-testing
testing-concept-delta-coverage
testing-concept-private-method-testing
testing-concept-test-units-not-classes
Avdi mentioned this in this post about any_instance http://parley.rubyrogues.com/t/any-instance-why-all-the-fuss/1998/9
They are tests that pass because you've forced them to pass, but don't really prove anything.
Read this guy's stuff: https://ntl.ghost.io/
um, don't nest too deeply because it will cause you confusion
fixtures vs. factories
http://chriskottom.com/blog/2014/10/4-fantastic-ways-to-set-up-state-in-minitest
"The main advantage of this technique over the use of instance variables defined in a setup method or before block is that the setup logic can be divided into smaller units and executed only in tests where they're needed."
from http://chriskottom.com/blog/2014/10/4-fantastic-ways-to-set-up-state-in-minitest
talk-integration-tests-are-bogus
http://thomascannon.me/posts/porting-to-minitest-part-1/
35:30 in integration tests are a scam collaboration tests, interaction tests (as opposed to state-based tests)
On the other side of these are the contract tests. (J.B. Rainsberger's terminology for these... what is Sandi Metz's?)
Two good ideas from this blog post
http://thomascannon.me/posts/porting-to-minitest-part-2/
"Only work on one type of test at a time"
"Functional tests are different than unit tests, which are different than integration tests, and so on. By only focusing on one type of test at a time it's easier to get in a groove and crank them out. And splitting the team up to work on different types of tests makes the porting faster and makes sure you don't step on each other's toes."
"Only work on one file at a time"
The quickest way to be overwhelmed and not make any progress is to run:
Instead, work on files in isolation:
ruby test/unit/user_test.rb
Article here: http://blog.arkency.com/2014/08/ruby-rails-adapters (haven't read it yet)
A spec, much like a well named method, can show that you gave consideration to something. An example is the very wide and very tall images that Kaushik was trying to get to work. Looking at the tests, it was clear they hadn't been considered, because there weren't tests for them.
You don't test all of Rails when you run your test suite. Maybe there are hidden gems that could be pulled from your app, which would allow them to not be tested with you app anymore, just like how Rails isn't tested with your app.
....
But nothing makes code easier to change than a quickly executing suite of tests that you trust -- nothing.
Uncle Bob Martin writes: http://blog.8thlight.com/uncle-bob/2014/05/19/First.html
In the first Is TDD Dead? hangout, at time 30:25 @dhh makes a remarkable statement:
"...you're not done until you also have tests for a piece of functionality -- I'm completely on board with that."
So, of course DHH thinks of testing as professionalism.
Something that DHH thinks happens (four lines of tests for every line of production code... 200% coverage). Kent Beck argues that it's actually high-coupling that's the issue, really, so you have to change too many tests when you want to change code.
What TDD won't help you do...
http://blog.extracheese.org/2009/11/the_limits_of_tdd.html
http://smartic.us/2008/08/15/tatft-i-feel-a-revolution-coming-on/
blog-post-time-to-bring-back-fixtures
blog-post-test-induced-design-damage
Martin Fowler talks about this... as either being done with TDD or with tests that are written after the fact.
I" want my feedback to be so fast that I can't think before it shows up. If I can think, then I'll sometimes lose attention, and I don't want to lose attention."
from https://www.destroyallsoftware.com/blog/2014/tdd-straw-men-and-rhetoric
TDD is useful and test isolation is useful, but they both involve making trade-offs. Unfortunately, doing them 100% of the time seems to be the best way to learn what those trade-offs are, and that can temporarily lead beginners toward extremism. TDD and isolation both break down in some situations, and learning to detect those situations in advance takes a lot of time. This is true of advanced techniques in any discipline, programming or otherwise. That is the honest, non-exaggerated, no-lies-involved truth.
from https://www.destroyallsoftware.com/blog/2014/tdd-straw-men-and-rhetoric
means TDD without isolation (from https://www.destroyallsoftware.com/blog/2014/tdd-straw-men-and-rhetoric)
Quoted from here: http://parley.rubyrogues.com/t/dhh-descrying-the-death-of-tatft/2067/7
See the rspec documentation... supposedly they talk about that.
Avdi Grimm says in this thread: http://parley.rubyrogues.com/t/dhh-descrying-the-death-of-tatft/2067/29 : Can we all just agree that any example of mocks that uses any_instance is by definition a bad example of using mocks?
He points to this thread: http://parley.rubyrogues.com/t/any-instance-why-all-the-fuss/1998
Mentioned here: http://david.heinemeierhansson.com/2014/test-induced-design-damage.html
"extract a functional core wherever it was natural, testing the core in isolation with no test doubles at all"
It's like how using only POROs allows you to have a much more complicated system under test, and to test all the interactions between all the components quickly.
blog-post-how-we-write-readable-feature-tests-in-rspec
High level acceptance tests facilitate sweeping architectural refactoring, but are not great for enumerating behavior. Low-level unit tests are great for facilitating the continual accretion of new constraints while protecting against regressions, but can hinder your ability to make large changes, since you have to pull them along for the ride.
Paying attention to your tests being hard to set up... Originally from GOOS? (They mention that they call it "listening to the tests", but did they coin the term?)
blog-post-writing-sensible-tests-for-happiness
blog-post-how-to-test-multithreaded-code