Back to Superfile

Implementation notes

testsuite/Notes.md

1.5.03.3 KB
Original Source

Implementation notes

  • The pyautogui sends input to the process in focus, which is the spf subprocess.
  • If spf is not exited correcly via q, it causes weird vertical tabs in print statements from python
  • There is some flakiness in sending of input. Many times, Ctrl+C is received as C in spf
    • If first key is Ctrl+C, its always received as C
  • Note : You must keep your focus on the terminal for the entire duration of test run. pyautogui sends keypress to process on focus.

To-dos

  • Write testsuite to validate new files getting created on first launch
    • We recently had a bug slip into main, where lastVersionFile would not get written

Input to spf

Pyautogui alternatives

POC with pyautogui as a lot of issues, stated above.

Linux / macOS

Windows

Directory setup

Tests and Validation

  • Each tests starts independently, so there is no strict order
  • Hardcoded validations . Predefined test, where each test has start dir, key press, and validations
  • We could have a base Class test. where check(), input(), init(), methods would be overrided
  • It allows greater flexibility in terms of testcases.
  • Abstraction layer for spf init, teardown and inputm