How to run automated tests after each commit?



  • In my last job as a software tester, we had a system, built by CEO long before I even joined the company, to run all the automated tests after each commit. So hundreds of tests been run all the time for several different software versions. A developer would do fixes, updates to the system, I could access the virtual machine through IP, to look at tests, find bugs, but I never went deep into figuring out the creation of such a thing.

    But now a few years after I left that company I am considering getting into testing again in a place that has zero automated testing and I believe they would expect me to create proper automation (mostly for websites, not software). This testing after each commit is the thing I have no idea where to begin from. Are there tools that can help with that? Does it need to be programmed from scratch? I truly have no idea how that starts and even works what I saw in my first company.

    Is there any source that would explain in depth the whole process of how to automatically run all tests after each commit or at least schedule the tests to be run at certain times day or night?

    Or maybe I am overthinking and this is not at all necessary to do?



  • No, you are not over thinking this. Automating the testing and deployment of applications is key in modern software development. It is grouped in the DevOps category. Test automation is a very important part of this.

    A typical test run scheduled on changes/commits is called a Continuous Integration or Build Server pipeline. Most build systems are also regular schedulers, they can also be used to run tests on a certain interval.

    The flow of a build server pipeline:

    • Monitors changes in a version control system
    • Pulls the changes to a build agent
    • Builds the source code
    • Run the unit-tests
    • Deploys the application to a staging environment
    • Runs the integration tests
    • Runs the end-to-end tests
    • Do a static code analysis (security, test code-coverage)
    • (optionally) Deploys to a production environment. (Called Continuous Delivery/Deployment)

    There are a lot of different build automation software products. Some are heavyweight, some are lightweight and do everything locally. See this list for a general idea.

    If you are not the sysadmin type I would suggest to use a cloud-based tool, but if you like to play with servers I would certainly try to set up your own pipeline from scratch.

    Although I have a preference in certain tools I suggest you do your own research, this article might be a good start: https://stackify.com/top-continuous-integration-tools/

    Other reads:


Log in to reply
 

Suggested Topics

  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2