robotframework / robotframework

Generic automation framework for acceptance testing and RPA
http://robotframework.org
Apache License 2.0
9.78k stars 2.33k forks source link

Deprecate using test data in HTML and TSV formats #2819

Closed pekkaklarck closed 6 years ago

pekkaklarck commented 6 years ago

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:

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.

pekkaklarck commented 6 years ago

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 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).

pekkaklarck commented 6 years ago

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

pekkaklarck commented 6 years ago

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:

pekkaklarck commented 6 years ago

This issue can be considered done.

dnekhayev commented 5 years ago

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:

pekkaklarck commented 5 years ago

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

dnekhayev commented 5 years ago

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

dnekhayev commented 5 years ago

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.

HelioGuilherme66 commented 5 years ago

@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.

dnekhayev commented 5 years ago

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

HelioGuilherme66 commented 5 years ago

@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.

dnekhayev commented 5 years ago

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

pekkaklarck commented 5 years ago

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.

HelioGuilherme66 commented 5 years ago

@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: helio.guilherme@iol.pt But, please send it only if the code can be made public, and identify the authors for them to have proper credits recognition.