Skip to content

IDE-friendly unit tests #188

@proway2

Description

@proway2

Right now tests created for page objects aren't discoverable by pytest, therefore IDEs (e.g. VS Code) aren't aware of tests presence, though there might be other unit tests discoverable by IDE. This results in the next problems:

  • Even if you need to run tests just for a single netloc you've got to run either all tests or to specify a path to a given test, which is not very convinient if you work with few different netlocs at a time.
  • web-poet implicitly registers a pytest plugin which, sometimes, is not needed. Disabling is possible, but you've got to use something like -p no:web-poet. Which is again makes the whole process less natural for the IDE.
  • No standard way to run a single test for a single URL.
  • Overall, the whole approach to unit tests varies drastically from the usual way pytest tests are created and used.

Would be really nice to have IDE-friendly tests for page objects that are:

  • discoverable by pytest and IDE without the need to configure some low-level stuff.
  • possible to run and debug in IDE a single test for a single URL.
  • pytest plugin could be easily disabled if needed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions