Reputation: 712
Currently experimenting (or trying to) with Robot Framework. I'm using Python-3 and I've managed to get a version of the framework for python 3.
pip install robotframework-python3
I downloaded the QuickStart guide which was recommended on the GitHub page and I had to convert some of it from Python2 to Python 3. This just included to minor changes, removing commas from try/except and a few brackets around prints. This ran the first test of tests wonderfully. When it came to running the other tests with the command:
pybot QuickStart.rst
I had this error in the .html error logs it produces:
Expected status to be 'SUCCESS' but was 'b'SUCCESS''.
This error was common across all of the tests. I understand that it's related to a binary response (vague guess from memory).
Does anybody know of a solution?
N.B Robot Framework 2.8.7 (Python 3.3.3 on darwin)
Many Thanks.
Upvotes: 0
Views: 630
Reputation: 36
I also did the same thing as you and encountered the issue.
Apart from modifying the sut/QuickStart.rst
, you may also need to modify the lib/LoginLibrary.py
to append one more parameter, i.e. universal_newlines=True
to subprocess.Popen(...)
such that it will be treated as string instead of byte sequence. The QuickStart.rst
test cases all pass now :)
You may check the reference https://docs.python.org/3/library/subprocess.html#subprocess.Popen
Upvotes: 2