File Hierarchy¶
The key to a good Screenplay Pattern suite is understanding how the files all fit together. The hierarchy described herein is one example of how the files can be organized and named. If your team feels strongly that there are better conventions to follow, renaming the files will not break any of ScreenPy’s functionality.
Here is an example hierarchy:
- suite_root
- features # this is where the actual test files will live
- feature1.py
- …
- questions # questions your actors will ask about the site
- question1.py
- …
- tasks # groups of actions your actors can perform, with descriptive names
- task1.py
- …
- user_interface # files containing locators and/or URLs for each page
- page1.py
- …
- requirements.txt # where you list screenpy!
- features # this is where the actual test files will live
Features¶
The feature films! The story arcs! The whole point of the suite! These are the features of your application that you are testing; this is where all the actual test files go.
Questions¶
Things your actor asks about the application, to perform a thrilling turnabout (test fail) or a cathartic confirmation (test pass) upon finding the answer. These files are where you will access elements on the page to figure out if your test has passed.
For more information, see the Questions page!