libdoc: [ERROR ] Error in file ... Non-existing setting 'Force Tags'.

1,392 views
Skip to first unread message

Yaroslav Kucheruk

unread,
Nov 21, 2016, 7:45:08 AM11/21/16
to robotframework-users
Hello,
I have bunch of test cases and suites that I need to generate a documentation for. But, I constantly getting
this sorts of errors.
As an example, even with this simple robot test case:
####
*** Settings ***
Force Tags    test

Test Setup    No Operation

Test Teardown    No Operation

*** Test Cases ***
Example
    Log To Console    "Hello To Console"
####

the errors still of the same type

(robot_env)happymonky@ubuntu:~/code/$ python -m robot.libdoc test.robot tmp/libdoc_output.html
[ ERROR ] Error in file '/home/happymonky/code/test.robot': Non-existing setting 'Force Tags'.
[ ERROR ] Error in file '/home/happymonky/code/test.robot': Non-existing setting 'Test Setup'.
[ ERROR ] Error in file '/home/happymonky/code/test.robot': Non-existing setting 'Test Teardown'.
Resource file '/home/happymonky/code/test.robot' contains a test case table which is not allowed.

Robot Framework 3.0 (Python 2.7.6 on linux2)

Please, help me out with this issue.
Any help would be appreciated!

Cheers,
Yaroslav

Bryan Oakley

unread,
Nov 21, 2016, 8:21:36 AM11/21/16
to robotframework-users
libdoc expects to be given libraries and resource files, not test case files. When you pass `test.robot` to libdoc, it will try to read it as a resource file. Within a resource file, `Force Tags`, `Test Setup` and `Test Test Teardown` are invalid settings. 

If you want to generate documentation for test cases then you need to use `testdoc`, not `libdoc`.

--
You received this message because you are subscribed to the Google Groups "robotframework-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to robotframework-users+unsub...@googlegroups.com.
To post to this group, send email to robotframework-users@googlegroups.com.
Visit this group at https://groups.google.com/group/robotframework-users.
For more options, visit https://groups.google.com/d/optout.

Yaroslav Kucheruk

unread,
Nov 21, 2016, 9:32:00 AM11/21/16
to robotframework-users
Hello Bryan,

Thank you for your help! I appreciate it very much!

Using `testdoc` may not be what I wanted, can I just change some code inside `libdoc` to make it understand .robot and .suite files to generate documentation? Is it a trivial task or `testdoc` is my only tool in this case?

Cheers,
Yaroslav

To post to this group, send email to robotframe...@googlegroups.com.

Tatu Aalto

unread,
Nov 21, 2016, 10:53:34 AM11/21/16
to kuch...@gmail.com, robotframework-users

Ugh

It's open source, you can modify as you please. But I think it's not a trivial task.

But to be able to answer better to your question, could you explain what problem you are trying to solve? And why the testdoc is not the solution for you?

-Tatu
Send from my mobile


To unsubscribe from this group and stop receiving emails from it, send an email to robotframework-users+unsubscrib...@googlegroups.com.

To post to this group, send email to robotframe...@googlegroups.com.
Visit this group at https://groups.google.com/group/robotframework-users.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "robotframework-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to robotframework-users+unsub...@googlegroups.com.
To post to this group, send email to robotframework-users@googlegroups.com.

Yaroslav Kucheruk

unread,
Nov 22, 2016, 4:49:05 AM11/22/16
to robotframework-users, kuch...@gmail.com
Hello Tatu,

The reason to use `libdoc` was that it produced different output than `testdoc`, thus I got two different formats. But for now, I think it would be good to use `testdoc` and not make the life hard.

Thanks for your help!
Yaroslav

понеділок, 21 листопада 2016 р. 17:53:34 UTC+2 користувач Tatu Aalto написав:
To unsubscribe from this group and stop receiving emails from it, send an email to robotframework-users+unsub...@googlegroups.com.
To post to this group, send email to robotframe...@googlegroups.com.
Visit this group at https://groups.google.com/group/robotframework-users.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "robotframework-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to robotframework-users+unsub...@googlegroups.com.

Pekka Klärck

unread,
Nov 25, 2016, 8:38:47 AM11/25/16
to kuch...@gmail.com, robotframework-users
Hello,

Libdoc parses the file as a resource file and you get these errors
because test case related settings and test case table itself aren't
allowed in resource files. That restriction makes sense when running
tests, but I wouldn't have anything against enhancing Libdoc to
support parsing and documenting test case files too. If you find that
important, please submit an enhancement request to Robot's issue
tracker. Even better if you have time, interest and skills to look how
it could be implemented.

Cheers,
.peke
> --
> You received this message because you are subscribed to the Google Groups
> "robotframework-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to robotframework-u...@googlegroups.com.
> To post to this group, send email to robotframe...@googlegroups.com.
> Visit this group at https://groups.google.com/group/robotframework-users.
> For more options, visit https://groups.google.com/d/optout.



--
Agile Tester/Developer/Consultant :: http://eliga.fi
Lead Developer of Robot Framework :: http://robotframework.org
Reply all
Reply to author
Forward
0 new messages