Skip to main content
All CollectionsTests / Autograding
How do I make sure student code outputs a specific string?
How do I make sure student code outputs a specific string?

Learn how to implement this common test type.

James avatar
Written by James
Updated over 4 years ago

The easiest way to assert that student code produces a specific string is to use an Input / Output test. Using this test type, you can compare the output of student code to a specific string, using either strict match (student code must match specified string exactly) or flexible match (ignores whitespace, case, and newlines). 

Did this answer your question?