Skip to content

Possibility to limit parsing of test case file to certain file type like --extension robot #2365

Closed

Description

@mkorpela

Html parsing is one of the most time consuming things in RF. Would be beneficial to have a way to totally ignore html files as RF has more preferable input types (such as *.robot)

Activity

  1. added this to the 3.0.1 milestone on Jun 1, 2016
  2. pekkaklarck commented on Dec 29, 2016

    @pekkaklarck
    Member

    Some design decisions to be made:

    1. What would be a good name for a command line option to select tests?
    2. Should it select files that are parsed or files that are ignored? Or do we need support for both?
    3. Should files be selected solely based on the extension or should we support patterns like *.robot?

    My thinking about 2. is that having just an option to select files ought to be enough. And with 3. I'd prefer just specifying extensions. Not that much benefits from patterns and something like *.robot needed to be escaped on the cli making it harder to use.

    I don't have any really good name ideas in mind, but perhaps --extension robot or --files robot would be fine. Both of these would tell Robot to only parse files with these extensions when scanning for tests.

  3. mkorpela commented on Dec 30, 2016

    @mkorpela
    MemberAuthor
    1. You could start with something odd and big --strict-robot-format-only and make a shorter option later? This way deprecation or changes would not really spoil the namespace of possible command line options.
    2. I would prefer parsed. Whitelisting and not blacklisting.
    3. I would prefer also just extensions. Downside is that you might have to implement the pattern later and possibly deprecate this option but I think it would be a bigger problem to make a more complex to use pattern paced solution now assuming we have correctly identified the valuable parsing problem here.
  4. pekkaklarck commented on Dec 30, 2016

    @pekkaklarck
    Member

    --strict-robot-format-only could only be used to parse only robot files. Something like --extension robot would allow using also --extension txt. Been thinking we could soonish start parsing only robot files by default, and this option could then be used to specify an alternative extension if needed.

    I got a prototype of this functionality already implemented. Still not sure should the option be --extension, --dataextension, --data, --dataformat, --format or something else.

  5. changed the title [-]Performance: ability to ignore html parsing[/-] [+]Possibility to limit parsing of test case file to certain type[/+] on Dec 30, 2016
  6. pekkaklarck commented on Dec 30, 2016

    @pekkaklarck
    Member

    My current plan is to use --format.

  7. changed the title [-]Possibility to limit parsing of test case file to certain type[/-] [+]Possibility to limit parsing of test case file to certain file type (e.g. `--format robot`)[/+] on Dec 31, 2016
  8. pekkaklarck commented on Dec 31, 2016

    @pekkaklarck
    Member

    And now this is done. Code review and especially testing would be appreciated. Should be pretty quick because I try to get RF 3.0.1 out still this year (Finnish time) and this was the last feature. Gotta run some acceptance tests and get some sleep first, though.

  9. pekkaklarck commented on Dec 31, 2016

    @pekkaklarck
    Member

    --format I used is a bit ambiguous. Need to think would --extension or --filetype be better. Also, there's probably only going to be RF 3.0.1 release candidate this year. No need to rush with the final release and better get some feedback from users before too.

  10. changed the title [-]Possibility to limit parsing of test case file to certain file type (e.g. `--format robot`)[/-] [+]Possibility to limit parsing of test case file to certain file type like `--extension robot`[/+] on Dec 31, 2016
  11. pekkaklarck commented on Dec 31, 2016

    @pekkaklarck
    Member

    Renamed --format to --extension. No other good short option was available so decided to keep using -F. I've been thinking we could deprecate --escape and that would free -E in the future.

  12. self-assigned this
    on Jan 5, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions