Deploying & Testing

You have finished writing the code, but now you want to see it in action! To directly deploy the code onto the robot, navigate to where your robot code is saved. There, run the following:


py -3 robot.py deploy
                                    

Code 12.1: since all robot code is saved as robot.py, the deploy keyword in the command line deploys directly to the robot while running tests in the process. Note that if this is the first time that you are deploying, you will be asked to confirm the SSH connection as well as provide the team number.

Testing without Deploying

If you wish to run the unit tests on the code and not deploy, then replace the deploy keyword with test


py -3 robot.py test 
                                    

There are more options for when you are deploying code. For example, to deploy quickly through skipping tests, add --skip-tests at the end of the general code for deploying. Additionally, if the pyfrc version is not matched to the robot version, you will receive a version mismatch error. In that case, deploy code by adding --no-version-check to the end of the general code for deploying.


Chapter resources: Deploying to Robot