Skip to main content

As with any software development project, you must test your code to know if it meets the requirements and design. You should have unit tested your new code as you integrated and debugged RegistrationManager. Now you will ensure sufficient coverage and system test PackScheduler.

PackScheduler Coverage

Ensure that all non-UI classes have at least 80% statement coverage. Add any needed tests to cover at least 80% of the statements.

Common Issue: Jenkins Coverage Failures

If your Jenkins build fails due to coverage issues, check the following:

  • RegistrationManager must have at least 80% statement coverage. Make sure your RegistrationManagerTest thoroughly tests login(), logout(), getCurrentUser(), and clearData().
  • Check that your Registrar class is an inner class of RegistrationManager in the edu.ncsu.csc216.pack_scheduler.manager package, not a standalone class in a different package.
  • The Registrar inner class is part of RegistrationManager. Ensure the RegistrationManager constructor (which creates the Registrar) is exercised by your tests.

PackSchedulerGUI

The teaching staff has provided three classes that comprise the GUI for PackScheduler. Create classes PackSchedulerGUI, CourseCatalogPanel, and StudentDirectoryPanel in the edu.ncsu.csc216.pack_scheduler.ui package and copy in the provided code. Note that there are updates to StudentDirectoryPanel, so you should use the provided code.

System Testing and Debugging

Download a copy of the system tests for PackScheduler. Save the system test plan file in the project_docs folder.

Do the following:

  • Run the tests on the PackScheduler project. If the test fails, debug your system until it passes.
  • Report the actual results of execution after debugging your system.
Recording Actual Results in the STP

When recording actual results in the system test plan, record “Pass” if the test passes as expected (i.e., the actual results match the expected results). If the test fails, record the actual (incorrect) behavior you observed so you can use it for debugging.

The following files are needed for testing (some you already have):

Reference: Staging and Pushing to GitHub

Push to GitHub

Push your PackScheduler project to GitHub

  • Add the unstaged changes to the index.
  • Commit and push changes. Remember to use a meaningful commit message describing how you have changed the code.
Reminder: Interpreting Jenkins

Check the following items on Jenkins for your last build and use the results to estimate your grade:

Check Jenkins

Check Jenkins and make sure that you have a green check and are passing your tests AND the teaching staff tests (both unit and system)!