-
Notifications
You must be signed in to change notification settings - Fork 6
Description
Note Organiser has still a reasonable size in terms of features, so while we have them all under control, it would be a nice thing to actually write them down to test them.
RobotFramework has actually a very nice interface, and allows to write the specifications as natural language, and implement the testing behind.
I have drafted the idea in the new branch, robotframework. Right now, the tests are not called at all. You can test them (they will fail, because nothing is implemented), by install robot framework, and running pybot ., or python -m robot.run . inside the noteorganiser/tests/ directory. The application will open, wouhou, and close. That's about it, for now.
The underlying libraries are separated into PysideLibrary.py, which could in term become a real Robot Framework package. I will put there all the generic Pyside functionnalities, screenshot, open/close, select based on type, etc... All the relevant code for testing NoteOrganiser itself is in NoteOrganiserTesting.py, which serves as a frontend for all the code in keywords/blabla.py.
Right now, the .robot files cover the first time setup, and some of the library interaction. Only the file resource.robot is imported by the test suite (all files defining some *** Test Cases ***). In natural.robot, I store right now mappings from natural sentences to more low-level calls.
Things to do include, among other things:
handle popup interaction (PysideLibraryandNoteOrganiserTesting)- finish writing the specifications (inside a
preview.robot,editor.robot) write some overarching scenarios.integrate in Travis
The goal of this is not necessarilly to get rid of the existing tests - some measure of unit testing, also for the UI, is a good thing. The idea is simply to cover all the high-level functionalities, and ensure that they work/continue to work throughout the development.