ISSAWI_ICS_Tester
A VS Code extension for Mr Issawi's ICS3 Python class. Students write their solutions in main.py, and the tester panel runs them against each exercise's test cases and shows which ones pass.
Source code: https://github.com/wesamissawi/python-tester-extension
Using it (students)
- Open your class folder in VS Code.
- Run the ics3 command from the Command Palette to open the tester panel.
- Pick an exercise, read the instructions, write your code in its
main.py, and run the tests.
- Run ics3 history to see your past test runs.
If Python isn't found, set python-tester-extension.pythonPath in Settings to your Python interpreter.
Releasing exercises
Exercises ship inside the extension. The class server decides which ones students see.
- Write and test exercises in
ICSWorkByDAy (next to this project folder) as usual. Put any starter code in starter.py; a student's new main.py starts with it.
- Run
npm run sync-exercises. It copies each exercise's instructions.md, test-config.json, starter.py and images into exercises/. Your main.py files are never copied. If any test-config.json has broken JSON, nothing is copied and the broken files are listed. It also creates or updates release.json in this project.
- Package the extension and install it on student computers.
release.json mirrors your folders, with "release": true or false on each unit, day and exercise:
{
"01_Intro": {
"release": true,
"Day1": {
"release": true,
"01_adding_up": { "release": true },
"02_say_hello": { "release": true }
},
"Day2": {
"release": false,
"01_get_ten": { "release": true }
}
},
"02_Functions": {
"release": false,
"Day01": {
"release": false,
"01_get_ten": { "release": true }
}
}
}
- An exercise appears only when it and every folder above it are
true. Above, only 01_Intro/Day1 is released.
- New units and days start
false and new exercises start true. To release a day, switch that day and its unit to true. To hold back one exercise in a released day, set that exercise to false.
- Anything missing from the file stays hidden. Re-running
npm run sync-exercises keeps your true/false values and adds any new folders.
Release them from the teacher site (www.issawi.ai → Releases): after npm run sync-exercises, press Import release.json, check the list, and Save. After that, toggling a switch and saving is all it takes; the server keeps the list, so there is no Drive copy to keep in step. Students get the change the next time they open the tester panel or press ⟳ Refresh. The last downloaded list keeps working offline.
While a student is signed in, the extension records each change they make to an exercise's main.py and sends it to the class server with their test results (and every 5 minutes while they work), and checks in about once a minute so the teacher's Progress tab can show who is working. It records nothing while signed out, and ics3 sign out discards anything not yet sent. Tell students their work in the tester is recorded for their teacher.
Students sign in once with ics3 sign in: with the email you added and a one-time invite code they use to set their own password. (ics3 sign out removes their sign-in and saved list from that computer.) The extension talks to https://api.issawi.ai; change python-tester-extension.serverUrl only to test against another server.
Students open one class folder in VS Code. For each released exercise, the tester creates Unit/Day/Exercise/main.py as an empty file. If the folder has no exercises yet, it asks first. It never overwrites existing work. Folders that have their own test-config.json, like ICSWorkByDAy itself, keep using their own files, so you can still test exercises while writing them.