Software testing and continuous integration

Software testing and continuous integration

"Introduction to testing practices for software development and in particular continuous integration, with a guided hands-on example."

Information

The estimated time to complete this training module is 2h.

The prerequisites to take this module are:

It is highly recommended to also have done the python script module, but that’s not strictly necessary.

If you have any questions regarding the module content please ask them in the relevant module channel on the school Discord server. If you do not have access to the server and would like to join, please send us an email at school [dot] brainhack [at] gmail [dot] com.

Resources

The slides are adapted from the original QLSC 612 course in 2020 by Greg Kiar

The video of the presentation is available below:

Exercise

  • Fork this repo for the hands on part.
  • Watch the video, and follow along the hands on material. You will implement the unit tests and the github action to execute the unit test.
  • Follow up with your local TA(s) to validate you completed the exercises correctly.
  • 🎉 🎉 🎉 you completed this training module! 🎉 🎉 🎉

Bonus and addendum : During the first part of the video I said we would implement unit tests, an integration test and an installation test. I forgot about the integration test during the hands on so I leave it to you as a bonus exercise, which corresponds to writing a test for the main function, since it integrates the other three functions. For the installation test, this one comes for free with the github action, as the action runs in a virtual machine and has to re-install the dependencies each time.

More resources

To learn more about pytest and all the nice things it offers, refer to the pytest documentation. You can also check tutorials such as this one or watch this PyConDE keynote.


Illustration by Nikita Golubev.