What are the pros and cons of running application testing during vs. after a docker build?
I support J.Doe's suggestion for separate Docker files for each of the build and test stage. Such approach also allows you to:


re-run the test stage for whatever reason (known intermittent failures, for example) without re-doing the build stage
run multiple different test stages in parallel using the same build - for example instead of running a single long test stage made up of serialized tests, for a potentially significant overall pipeline speeding up.