VeraCodeChecker
Back to Documentation
Teacher Guide

Creating Activities

Comprehensive guide to creating coding activities using manual modes (I/O Testing, Assertion-Based, Manual Review) and the AI Activity Generator.

I/O Testing (Python/Java/C)

When to use: Programs that read from standard input (stdin) and write to standard output (stdout). Perfect for algorithm challenges, data processing, and console applications.

What You Define

Answer Key

Your reference implementation. Upload a file or paste code that solves the problem correctly.

Test Cases

Input/output pairs. Each test provides input via stdin and expects exact output match.

Validation Process

Run Your Answer Key

Click Validate Test Cases to compile and execute your answer key against all test cases. All tests must pass before you can proceed to publishing.

Best Practices

Specify Exact Format

In your instructions, clearly state the input format and output format. Example: "First line contains N, next N lines contain integers..."

Explain Whitespace/Case Expectations

Default comparison is exact (whitespace and case-sensitive). Tell students: "No extra spaces or newlines" or "Case must match exactly."

Include Sample I/O

Add 1-2 example inputs and outputs in the activity description so students understand the format.

Add Edge Cases

Test edge scenarios: empty input, large values, negative numbers, invalid input (if applicable). This ensures students handle all cases properly.

Important: The platform compares output character-by-character by default. Even a single extra space or newline will cause a test to fail. Make sure your instructions are crystal clear!

Assertion-Based Testing (Java Only)

When to use: Object-oriented exercises where you want to validate specific methods or classes. Perfect for testing algorithms, data structures, and OOP concepts.

How It Works

1

Upload Answer Key

Upload your reference implementation. Multiple files are allowed, but your answer key must include a main method.

2

Generate Test Cases with AI

Click Generate Test Cases with AI to auto-generate method-level assertion tests. The AI analyzes your code and proposes targeted tests for each method.

3

Edit & Confirm Tests

Review the generated tests, make adjustments as needed, and confirm they match your expectations.

4

Proceed to Publishing

Set due date, integrity options, grading mode, assign to classrooms, and publish or save as draft.

Important Rules

Critical Requirements

  • One public class at compile time (enforced automatically)
  • Avoid package statements (can cause compilation errors)
  • Method signatures must be identical between your answer key and student code
  • Main method required in the answer key

How the evaluator works:

The system creates a "skeleton" of your answer key with empty method bodies, then swaps in the student's method implementations. This ensures that assertions run reliably against student code while preserving your test structure. See Evaluator Internals for technical details.

AI Activity Generator (Wizard)

What it is: A faster way for teachers to create complete activities. The AI wizard drafts the title, instructions, test cases, and answer key for you. You can review and edit everything before publishing.

Where it lives: Activities → New Activity → "Use AI Generator" (Beta)

How It Works (Step-by-Step)

1

Define the Brief

Topic

e.g., "Arrays and loops", "FizzBuzz variations", "Classes & objects"

Language

Java, C, or Python

Difficulty

Beginner, Intermediate, or Expert

Class Level

High School, University, Bootcamp, etc.

Learning Objectives

Enter your own (e.g., "Practice array traversal and index bounds") or click "Let AI suggest objectives" to auto-fill.

2

Review the Generated Activity

The AI will generate:

  • Title (clear, student-friendly)
  • Instructions (problem statement, I/O expectations)
  • Test Cases (input/output pairs)
  • Answer Key (reference solution, downloadable)

Everything is fully editable! Click Regenerate if you want a fresh take with different difficulty or prompt wording.

3

Validate Tests

Click Validate Test Cases to compile and run the AI-generated answer key against all generated tests. Fix or edit any cases that don't pass. Optionally add extra edge cases.

4

Schedule & Grading

Due Date: Set when the activity is due

Academic Integrity: Require name/ID comment (auto-deduction if missing)

Grading Mode: Per-Test (points per case) or Percentage-Based (passed/total × 100)

Classrooms: Assign to multiple classrooms if needed

5

Review & Publish

Preview everything (instructions, tests, grading, assignments). Click Publish or Save as Draft.

Note: Scheduled publishing is not yet available in beta. You can only publish immediately or save as draft.

What the AI Generates

Activity Content

  • ✓ Clear, student-friendly title
  • ✓ Complete problem statement
  • ✓ Input/output format specifications
  • ✓ Sample I/O examples

Test Materials

  • ✓ 1-N I/O test cases
  • ✓ Reference answer key (downloadable)
  • ✓ Edge cases and validation tests
  • ✓ Expected outputs for all tests

Default Mode: AI wizard produces I/O-based activities for Python, Java, and C.

For Java assertion testing (method-level validation), use the Manual → Assertion-Based flow, then click "Generate Test Cases with AI" after uploading your answer key.

Best Practices & Tips

Be Specific in the Topic

Instead of "Arrays", try "Arrays and loops — sum, min, max with edge cases (empty, negatives)." More detail = better AI output.

Set the Right Audience

The Class Level helps the AI choose examples and constraints that fit your cohort (e.g., high school vs. university vs. bootcamp).

Edit for Exactness

If output must be exact (default), make sure instructions say "No extra spaces/newlines." Review and adjust generated instructions as needed.

Add Edge Cases

The AI generates good baseline tests, but you can add your own edge cases (e.g., empty input, max sizes, non-standard spacing) for comprehensive coverage.

Validate Before Publish

Always run Validate Test Cases to ensure zero surprises on student submissions. This catches any AI-generated errors early.

Which Mode Should I Use?

ModeBest ForLanguagesSetup Time
AI GeneratorQuick activity creation, standard I/O problemsJava, Python, C~2 minutes
I/O TestingCustom console programs, algorithm challengesJava, Python, C~5-10 minutes
Assertion-BasedOOP exercises, method-level validationJava only~10-15 minutes
Manual ReviewComplex projects, UI/UX, creative codingAny~2 minutes