Skip to content

Deprecate using test data in HTML and TSV formats #2819

Closed

Description

@pekkaklarck

Robot currently supports test data natively in plain text, HTML and TSV formats, and it can also read data from reStructuredText files and parse it as plain text or HTML depending on the usage. We have decided to drop support for HTML and TSV formats as well as reST that's parsed as HTML. The main reasons are:

  • The plain text format is easiest to edit and works best in version control systems.
  • In practice nobody seem to use HTML or TSV formats anymore.
  • Different data formats are confusing to new users.
  • Having just one data format makes it easier to enhance parsing and add new features.

We are not going to remove HTML and TSV support in RF 3.1 yet, but we are going to loudly deprecate it to make sure possible existing users learn about it. Unless there are very strong use cases to preserve these formats, they will be removed in RF 3.2. In that version we are also initially planning to add new syntax like IF/ELSE, and having just one data format is going to help.

Activity

  1. added this to the v3.1 milestone on Apr 26, 2018
  2. pekkaklarck commented on Apr 26, 2018

    @pekkaklarck
    MemberAuthor

    For TSV users this change is not going to be a show stopper, because the plain text format is nearly 100% compatible with the TSV syntax. The main differences are:

    • In TSV format possible quotes around column contents like "my data" are ignored. TSV producers must be configured not to use quoting.
    • Empty columns in TSV data (i.e. \t\t) are considered to contain an empty string, but in the plain text format any number of tabs (or spaces) is just one separator between keywords and arguments. In practice empty columns must be avoided and, for example, ${EMPTY} variable used instead.

    In addition to this, --extension tsv or --extension robot:tsv would need to be used to tell Robot to parse only/also files with the .tsv extension (#2820).

  3. pekkaklarck commented on Apr 26, 2018

    @pekkaklarck
    MemberAuthor

    One task related to this is removing everything related to the HTML and TSV test data templates from the repository, User Guide, and elsewhere.

  4. pekkaklarck commented on Jun 27, 2018

    @pekkaklarck
    MemberAuthor

    HTML format is now deprecated and there is a warning everything HTML file is parsed.

    With TSV files there is a warning that they won't be parsed by default in the future but --extension TSV can be used to enable parsing them (#2820). In addition to that, using empty cells and quoting values in TSV files is deprecated.

    Things to do:

    • Consider how to handle resource files in TSV format. Currently there is no warning about using them even if --extension wasn't used. Only possible empty cells and quoting cause warnings.
    • Update User Guide
    • Remove templates and references related to them
  5. pekkaklarck commented on Jul 5, 2018

    @pekkaklarck
    MemberAuthor
    • Decided not to emit warnings if TSV files are used as resource files.
    • User Guide has been updated.
    • Templates have been removed.

    This issue can be considered done.

  6. dnekhayev commented on Oct 27, 2018

    @dnekhayev

    Hi Pekka,
    Actually, you've killed me with the input formats deprecation.
    I use xls files to store test scripts & test data.
    It's convenient to me:

    • to store all that I need for testing features in one place
    • to work by the whole team using google documents service
    • using cell's formatting
    • etc
  7. pekkaklarck commented on Oct 27, 2018

    @pekkaklarck
    MemberAuthor

    Robot has never supported xls files. Do you save files as tsv or otherwise convert them to format understood by Robot?

  8. dnekhayev commented on Oct 27, 2018

    @dnekhayev

    I patched Robot and added xls file parsing. If you request I will share that code.

  9. dnekhayev commented on Oct 27, 2018

    @dnekhayev

    I was hoping that you would decide to allow using parsers as plugins to Robot, but, unfortunately, you didn't. In that case it would be possible to use, for instance, google documents api.

  10. HelioGuilherme66 commented on Oct 27, 2018

    @HelioGuilherme66
    Member

    @dnekhayev Would you be interested in sharing your code, and proceed with the plugin concept for those deprecated formats? Then we could see if it would be considered part of robotframework core, or an external project.

  11. dnekhayev commented on Oct 27, 2018

    @dnekhayev

    Hi @HelioGuilherme66
    I suppose that you are a robot framework team member, aren't you?

  12. HelioGuilherme66 commented on Oct 27, 2018

    @HelioGuilherme66
    Member

    @dnekhayev I am just one community member who have contributed with corrections or improvements on robotframework's projects. I do have some interest in the file format features, because I maintain RIDE, and would like to keep it supporting all formats (and at least an easy way to convert to current formats). I see many people wanting to use xls format with robotframework.

  13. dnekhayev commented on Oct 27, 2018

    @dnekhayev

    @HelioGuilherme66 Thank you for the update.
    Could you please provide me with email address?
    I'll send a link to the code.

  14. pekkaklarck commented on Oct 27, 2018

    @pekkaklarck
    MemberAuthor

    Using XLS files as an input for Robot directly and in generally using spreadsheets as an editor or IDE for Robot sounds interesting. If you got something to share, it would be awesome if you could do it publicly so that others can also learn and possibly use whatever you've created.

    The above said, the decision to drop support of HTML and TSV files is not going to change. Our plan is to concentrate fully on the plain text format. We already have a plan to rewrite the plain text test data parser, and then add new features like IF/ELSE and nested control structures to the language. I'll write more about these plans to the users mailing list in the near future.

    Although the core framework will concentrate only on the plain text test data, it doesn't mean other data formats couldn't be supported one way or the other. Possibilities include:

    1. Converting data in formats not supported by Robot, for example XLS, into the plain text format before running tests.

    2. Create a tool that can parse other formats, generate tests using robot.api.TestSuite, and then run these tests and generate logs/reports.

    3. Make it possible to register plugins for different data formats. Such plugins could use the aforementioned robot.api.TestSuite or possibly some lower level API that the new parser is going to have.

  15. HelioGuilherme66 commented on Oct 27, 2018

    @HelioGuilherme66
    Member

    @HelioGuilherme66 Thank you for the update.
    Could you please provide me with email address?
    I'll send a link to the code.
    @dnekhayev You can use this email address: [email protected]
    But, please send it only if the code can be made public, and identify the authors for them to have proper credits recognition.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions