Package com.studentgui.tools
Class SmokeTest
java.lang.Object
com.studentgui.tools.SmokeTest
Minimal automated smoke test for chart rendering and PNG export functionality.
Generates deterministic synthetic assessment data, renders it via JLineGraph,
and writes a PNG to the app data folder. Used to verify:
- JFreeChart rendering pipeline functions correctly
- PNG export via
JLineGraph.saveChart(java.nio.file.Path, int, int)produces valid image files - File I/O permissions and folder creation work as expected
- Chart layout and visual appearance match expectations (manual review)
Usage:
java -cp StudentDataGUI.jar com.studentgui.tools.SmokeTest
Expected Output:
Smoke test wrote chart to: /path/to/app_home/StudentDataFiles/Smoke_Test/plots/SmokeTest-2024-01-15.png Exists: true
Test Data: Generates 3 synthetic sessions with 28 skills each, using
the formula (skillIndex + sessionIndex) % 5 to produce deterministic
values in the 0–4 range.
Output Location: app_home/StudentDataFiles/Smoke_Test/plots/SmokeTest-<ISO_DATE>.png
Validation: Success is indicated by "Exists: true" output and a valid 800×400px PNG file at the reported path. Visual inspection of the chart should show 3 line series (2 gray, 1 black) with colored background bands.
- See Also:
-
Method Summary
-
Method Details
-
main
Entry point for the smoke test.- Parameters:
args- ignored- Throws:
Exception- on IO or chart errors
-