Sign inGet started


Deepnote doesn't have integrated auto-grading solutions, but we've put together a list of useful packages that will do the job for you. Each library has a different setup and uses slightly different grading mechanisms.

The simplest solution is to include the tests in the student's assignments. This allows students to run the tests themselves. Keep in mind, it may also allow them to potentially use the tests to skirt the assignment.

There are three types of tests: unit tests, hidden unit tests with immediate scores, and hidden unit tests with scores after submission. Sometimes you may want to test a variable value, not a function, so those are included first.

1. OKpy library


The software was developed for CS 61A at UC Berkeley. This library supports programming projects by running tests, tracking progress, and assisting in debugging. You can find the entire GitHub repository for the library here!

2. Tests from imported files

Group 3919.png

This is a simple test that functions with asserts in separate files. A useful thing about separate files is that they can be switched later.

3. Inline tests

Screenshot 2022-12-22 at 14.37.59.png

In-line tests are small pieces of code used to test a specific function or aspect of a more extensive program. They're often used to validate the correctness of code and ensure it's working as intended. In-line tests are usually written within the same file as the code being tested, hence their name.

4. Doc tests

Screenshot 2022-12-22 at 14.30.05.png

Doc tests are a way to embed test cases within the documentation for a piece of code. They allow developers to specify expected input and output for a given function or method, and then automatically verify that the code produces the expected results when run. Doc tests are often used to ensure that code examples in the documentation are accurate and up to date.

5.) Unit tests

Screenshot 2022-12-22 at 14.32.21.png

Unit tests are small, isolated tests that verify the correctness of a specific component or unit of code. They're used to make sure individual parts of a larger program are working correctly, and are typically written by developers as they're writing code. Unit tests are generally automated, meaning they can be run automatically by a testing framework or tool with the results being checked automatically as well.