Skip to main content

Python 3 compatible generic test automation framework

Project description

Robot Framework with Python 3 compatibility

  • Forked from https://robotframework.googlecode.com

  • Still compatible with all officially supported Python 2.x platforms and versions, starting with 2.5

  • Not tested with Python 3 < 3.3

  • Invokes 2to3 in setup.py, atest/run_atests.py and utest/run_utests.py in addition to manual code changes

  • Goal is to make code completely 2/3 compatible without the need for 2to3, at the cost of dropping Python 2.5 support

Please report any issues to:

https://bitbucket.org/userzimmermann/robotframework-python3/issues

You can look at this URL for a complete code diff:

https://bitbucket.org/userzimmermann/robotframework-python3/compare/master..robot#diff

Differences in Python 3

Python 3 makes a clear distinction between str for textual data and bytes for binary data. This affects the Standard Test Libraries and their Keywords:

  • str arguments don’t work where bytes are expected, like writing to binary file streams or comparing with other bytes.

  • bytes don’t work where str is expected, like writing to text mode streams or comparing with another str.

  • Reading from binary streams always returns bytes.

  • Reading from text streams always returns str.

You can use the following keywords to explicitly create bytes:

  • BuiltIn.Convert To Bytes

  • String.Encode String To Bytes

I extended Process.Start Process with a binary_mode argument. By default the process streams are opened in text mode. You can change this with setting binary_mode=True.

Collections.Get Dictionary Keys normally sorts the keys. I disabled key sorting in Python 3, because most builtin types are not comparable to each other. This further affects Get Dictionary Values and Get Dictionary Items. I still need to find a better solution… Maybe imitate Python 2 sorting? Any suggestions? :)

– Stefan Zimmermann

Robot Framework

Robot Framework is a generic test automation framework for acceptance testing and acceptance test-driven development (ATDD). It has easy-to-use tabular test data syntax and utilizes the keyword-driven testing approach. Its testing capabilities can be extended by test libraries implemented either with Python or Java, and users can create new keywords from existing ones using the same syntax that is used for creating test cases.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

robotframework-python3-2.8.3.tar.gz (583.6 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page