0

Are there any rules or articles which discuss where tests should ideally be run? Specifically smoke tests. Smoke tests should run quickly after someone checks in new code. If you are looking for fast turnaround time from a test, I would think it is best to have the tests execute/run on the same on which your website and website-server are located (especially if the website being testing is not the production server ... specifically created for running tests against).

If the tests were specifically testing lag time between the client and server machine, maybe it would be necessary to put the tests on a separate machine then; but the tests are not testing latency issues or network issues.

Was just looking for any advice, opinions or links to articles pertaining to where to run tests in relation to the site being tested.

1

No, but they could.

Typically the test-runner runs on a build-server agent. The build-server builds a build, deploys it to a test-environment and runs the end-to-end tests against the environment. If the agents and the test-environment are in the same network/cloud the network overhead is probably irrelevant anyways.

I would advice the simplest thing that might work, and make it complexer when needed. So if you now deploy your application and run the tests from the same machine and it works for you, keep doing it.

1

Smoke tests are typically executed as a part of the deployment, and if it fails the deployment should be rolled back. Smoke tests are typically purely functional, but can of course also be used for also checking latency.

If you are talking about regression tests, these should be executed on each pull request (to avoid messing up the main branch(es)), and after merge. These should be tests run locally on the build agent.

1

No.

The selenium tests do not need to run on the same server that is serving the application code.

When you are using selenium you are using a web browser to access HTML pages - not code - that the application has been prepared.

The main concerns I would consider are whether these additional process present any network or memory issues to that server

In terms of code I would recommend a good practice is to keep application and engineering code in the same repository so that tests are most easily available to developers. Developers running the app server locally might therefore have them on the same machine - but this is different from production deployment.

In terms of server I would recommend a good practice is to use different servers to run the app code and the automation code. Simply put, servers are so cheap, plus so easy to provision one in the cloud, why not go with two (or more) ? The cost to fully analyze having them on one machine is more than the cost of a second machine

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.