Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 6 Next »

This page explains how to write pytest-based tests for SCuM.




  • one more test script added into repository

  • the Jenkins job runs the test scripts


  • Log into the Jenkins builder server

  • Install PyTest on the builder server with following command:

    • pip install pytest==4.6.0 # 4.6.0 is the latest pytest version supporting Python 2

  • Git clone the target repo:

  • Create a folder in the root directory called “test“

  • Create a file called ““ under “test“ folder

  • Write the test script following the document online at:

    • Here is an example of test script

        import pytest
      import os
      def syscall(cmd):
          print '>>> {0}'.format(cmd)
      def test_compilation():
          result = syscall("echo compilation...")
          assert result == None
      def test_bootload():
          result = syscall("echo bootload...")
          assert result == None
      def test_communication():
          result = syscall("echo communication...")
          assert result == None
  • Setup a Jenkins job (read Jenkins/GitHub Integration), under “Build Step”, create a script and run command pytest

  • No labels