What is midway testing?
Asked Answered
H

1

9

So I've heard of unit and integration testing, but I just recently heard of midway testing. It seems like the term is used most commonly in an AngularJS context. A Google query turned up very little information on the topic. My questions about midway testing are these:

  1. How does it differ from unit and integration testing?
  2. What purpose does it serve?
  3. What problems does it address that the other two approaches do not address?
  4. Is it an AngularJS specific concept?
Hydroplane answered 10/6, 2014 at 20:48 Comment(1)
I started writing an answer but it ended up just being a whole bunch of information quoted from an article: yearofmoo.com/2013/01/…Timberlake
I
8

From my own research, midway testing appears to be unit testing, but with some automation in there to avoid having to do mocking or stubs for things like XHR requests. They call it "midway" to imply it's midway between a full "end to end" test (e.g., user testing) and a unit test.

I've only seen this name used with AngularJS, though the concept could certainly be applied to any package or library where an automated layer was provided to help avoid having to do stubs and mocks.

More here: Midway Testing

Inequality answered 10/6, 2014 at 21:18 Comment(2)
I like what you say about it being "midway between a full "end to end" test and a unit test." I've been thinking about this a little more. Testing directives is a prime example of midway testing. When you test directives, they have to be $compile'd. That means that they depend on a large portion of the angular framework even in tests. That portion of the framework cannot be controlled by the test. Thus it is somewhere between bootstrapping your entire application in order to run end-to-end tests and unit testing functions in the directive definition directly.Hydroplane
I'll also add that since asking this question, I haven't encountered any more references to "midway testing" online.Hydroplane

© 2022 - 2024 — McMap. All rights reserved.