Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/rickypc/robotframework-imaplibrary
IMAP email testing library for Robot Framework
https://github.com/rickypc/robotframework-imaplibrary
Last synced: 26 days ago
JSON representation
IMAP email testing library for Robot Framework
- Host: GitHub
- URL: https://github.com/rickypc/robotframework-imaplibrary
- Owner: rickypc
- License: apache-2.0
- Fork: true (lovelysystems/robotframework-imaplibrary)
- Created: 2015-12-08T18:37:59.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2021-09-20T07:34:32.000Z (about 3 years ago)
- Last Synced: 2024-10-11T20:49:23.716Z (2 months ago)
- Language: Python
- Homepage: https://pypi.python.org/pypi/robotframework-imaplibrary
- Size: 132 KB
- Stars: 21
- Watchers: 6
- Forks: 35
- Open Issues: 19
-
Metadata Files:
- Readme: README
- Changelog: CHANGELOG.rst
- License: LICENSE
Awesome Lists containing this project
- awesome-robotframework - IMAP Library
README
IMAP email testing library for Robot Framework
==============================================|Docs| |Version| |Status| |Python| |Download| |License|
Introduction
------------ImapLibrary is a IMAP email testing library for `Robot Framework`_.
More information about this library can be found in the `Keyword Documentation`_.
Maintainership Transfer
-----------------------Please note the new authoritative git repository for `robotframework-imaplibrary`_ package is:
https://github.com/rickypc/robotframework-imaplibrary`robotframework-imaplibrary`_ package ownership is transitioned to me as the new project maintainer.
I will go through the pull requests from previous repository, as well as issue list.
I will try to accomodate as much as I could as time permit. **There is no need to re-post.**If you are interested to contribute back to this project, please see **Contributing** section.
Examples
''''''''.. code:: robotframework
*** Settings ***
Library ImapLibrary*** Test Cases ***
Email Verification
Open Mailbox host=imap.domain.com [email protected] password=secret
${LATEST} = Wait For Email [email protected] timeout=300
${HTML} = Open Link From Email ${LATEST}
Should Contain ${HTML} Your email address has been updated
Close MailboxMultipart Email Verification
Open Mailbox host=imap.domain.com [email protected] password=secret
${LATEST} = Wait For Email [email protected] timeout=300
${parts} = Walk Multipart Email ${LATEST}
:FOR ${i} IN RANGE ${parts}
\\ Walk Multipart Email ${LATEST}
\\ ${content-type} = Get Multipart Content Type
\\ Continue For Loop If '${content-type}' != 'text/html'
\\ ${payload} = Get Multipart Payload decode=True
\\ Should Contain ${payload} your email
\\ ${HTML} = Open Link From Email ${LATEST}
\\ Should Contain ${HTML} Your email
Close MailboxInstallation
------------Using ``pip``
'''''''''''''The recommended installation method is using pip_:
.. code:: console
pip install robotframework-imaplibrary
The main benefit of using ``pip`` is that it automatically installs all
dependencies needed by the library. Other nice features are easy upgrading
and support for un-installation:.. code:: console
pip install --upgrade robotframework-imaplibrary
pip uninstall robotframework-imaplibraryNotice that using ``--upgrade`` above updates both the library and all
its dependencies to the latest version. If you want, you can also install
a specific version:.. code:: console
pip install robotframework-imaplibrary==x.x.x
Proxy configuration
'''''''''''''''''''If you are behind a proxy, you can use ``--proxy`` command line option
or set ``http_proxy`` and/or ``https_proxy`` environment variables to
configure ``pip`` to use it. If you are behind an authenticating NTLM proxy,
you may want to consider installing CNTML_ to handle communicating with it.For more information about ``--proxy`` option and using pip with proxies
in general see:- http://pip-installer.org/en/latest/usage.html
- http://stackoverflow.com/questions/9698557/how-to-use-pip-on-windows-behind-an-authenticating-proxy
- http://stackoverflow.com/questions/14149422/using-pip-behind-a-proxyManual installation
'''''''''''''''''''If you do not have network connection or cannot make proxy to work, you need
to resort to manual installation. This requires installing both the library
and its dependencies yourself.- Make sure you have `Robot Framework installed`_.
- Download source distributions (``*.tar.gz``) for the library:
- https://pypi.python.org/pypi/robotframework-imaplibrary
- Download PGP signatures (``*.tar.gz.asc``) for signed packages.
- Find each public key used to sign the package:
.. code:: console
gpg --keyserver pgp.mit.edu --search-keys D1406DE7
- Select the number from the list to import the public key
- Verify the package against its PGP signature:
.. code:: console
gpg --verify robotframework-imaplibrary-x.x.x.tar.gz.asc robotframework-imaplibrary-x.x.x.tar.gz
- Extract each source distribution to a temporary location.
- Go to each created directory from the command line and install each project using:
.. code:: console
python setup.py install
If you are on Windows, and there are Windows installers available for
certain projects, you can use them instead of source distributions.
Just download 32bit or 64bit installer depending on your system,
double-click it, and follow the instructions.Directory Layout
----------------doc/
`Keyword documentation`_src/
Python source codetest/
Test filesutest/
Python unit testUsage
-----To write tests with Robot Framework and ImapLibrary,
ImapLibrary must be imported into your Robot test suite... code:: robotframework
*** Settings ***
Library ImapLibrarySee `Robot Framework User Guide`_ for more information.
More information about Robot Framework standard libraries and built-in tools
can be found in the `Robot Framework Documentation`_.Building Keyword Documentation
------------------------------The `Keyword Documentation`_ can be found online, if you need to generate the keyword documentation, run:
.. code:: console
make doc
Run Unit Tests, and Test Coverage Report
----------------------------------------Test the testing library, talking about dogfooding, let's run:
.. code:: console
make test
Contributing
------------If you would like to contribute code to Imap Library project you can do so through GitHub by forking the repository and sending a pull request.
When submitting code, please make every effort to follow existing conventions and style in order to keep the code as readable as possible. Please also include appropriate test cases.
Before your code can be accepted into the project you must also sign the `Imap Library CLA`_ (Individual Contributor License Agreement).
That's it! Thank you for your contribution!
License
-------Copyright (c) 2015-2016 Richard Huang.
This library is free software, licensed under: `Apache License, Version 2.0`_.
Documentation and other similar content are provided under `Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License`_.
.. _Apache License, Version 2.0: https://goo.gl/qpvnnB
.. _CNTML: http://goo.gl/ukiwSO
.. _Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License: http://goo.gl/SNw73V
.. _Imap Library CLA: https://goo.gl/forms/QMyqXJI2LM
.. _Keyword Documentation: https://goo.gl/ntRuxC
.. _pip: http://goo.gl/jlJCPE
.. _Robot Framework: http://goo.gl/lES6WM
.. _Robot Framework Documentation: http://goo.gl/zy53tf
.. _Robot Framework installed: https://goo.gl/PFbWqM
.. _Robot Framework User Guide: http://goo.gl/Q7dfPB
.. _robotframework-imaplibrary: https://goo.gl/q66LcA
.. |Docs| image:: https://img.shields.io/badge/docs-latest-brightgreen.svg
:target: https://goo.gl/ntRuxC
:alt: Keyword Documentation
.. |Version| image:: https://img.shields.io/pypi/v/robotframework-imaplibrary.svg
:target: https://goo.gl/q66LcA
:alt: Package Version
.. |Status| image:: https://img.shields.io/pypi/status/robotframework-imaplibrary.svg
:target: https://goo.gl/q66LcA
:alt: Development Status
.. |Python| image:: https://img.shields.io/pypi/pyversions/robotframework-imaplibrary.svg
:target: https://goo.gl/sXzgao
:alt: Python Version
.. |Download| image:: https://img.shields.io/pypi/dm/robotframework-imaplibrary.svg
:target: https://goo.gl/q66LcA
:alt: Monthly Download
.. |License| image:: https://img.shields.io/pypi/l/robotframework-imaplibrary.svg
:target: https://goo.gl/qpvnnB
:alt: License