Create test cases

There are three areas in which you can import or upload files:

In each file section, you have the option to upload a file, create a new one, or import a file from your workbench.

When working with Java, please note that the driver file does not require a ".java" suffix. There is a subpage about using the help file to pull in a complete solution. Following this link to the Java page.

Additionally, there is an option to generate a solution using OpenAI. You'll need to adjust the class name as necessary and ensure that the input/output text aligns with your problem description.

Follow the following instructions to add test cases.

If the students need to provide a test driver, how could I specify a test case?

You need to create a nearly empty file(a file with fewer than 10 characters), and upload the file as the test driver in the Test Main section. The file will be used as the placeholder in the test.

If I need to use text file input, where do I put the text files?

Generally you are advised not to use text files for testing purpose.  The input data file are redirected to standard input. If you do like to use text files, you may include them in the Test Main file section. If you gave the data file in the Help file section, make sure they are also included in the Test Main section, as the students may change the content of the files in their work bench.

The order of the files that are copied to the test folder are:

FOR C++ only: If the student has files with a main function, will this cause any issues because there are more than one main functions?

The student may have their own test files, and they don't have to remove them before submission. Just make sure that their files with main function has a Test as part of the file name, they will be ignored in the linking.

Also they need to make sure that no other files has Test in them(otherwise they will be ignored).

If the instructor need to have student provide a test driver, the driver should have Test as part of the name and there should be a place holder file in the Test Main section.