IMAP email testing library for Robot Framework
==============================================
[Docs](https://lasselindqvist.github.io/robotframework-imaplibrary2/doc/ImapLibrary2.html)
Introduction
------------
Note: This is a fork of
<https://github.com/rickypc/robotframework-imaplibrary>
ImapLibrary2 is a IMAP email testing library for [Robot
Framework](http://goo.gl/lES6WM).
More information about this library can be found in the [Keyword
Documentation](https://lasselindqvist.github.io/robotframework-imaplibrary2/doc/ImapLibrary2.html).
If you are interested to contribute back to this project, please see
**Contributing** section.
### Examples
``` {.sourceCode .robotframework}
*** Settings ***
Library ImapLibrary2
*** Test Cases ***
Email Verification
Open Mailbox host=imap.domain.com user=email@domain.com password=secret
${LATEST} = Wait For Email sender=noreply@domain.com timeout=300
${HTML} = Open Link From Email ${LATEST}
Should Contain ${HTML} Your email address has been updated
Close Mailbox
Multipart Email Verification
Open Mailbox host=imap.domain.com user=email@domain.com password=secret
${LATEST} = Wait For Email sender=noreply@domain.com 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 Mailbox
```
Installation
------------
### Using `pip`
The recommended installation method is using
[pip](http://goo.gl/jlJCPE):
``` {.sourceCode .console}
pip install robotframework-imaplibrary2
```
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:
``` {.sourceCode .console}
pip install --upgrade robotframework-imaplibrary2
pip uninstall robotframework-imaplibrary2
```
Notice 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:
``` {.sourceCode .console}
pip install robotframework-imaplibrary2==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](http://goo.gl/ukiwSO) 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-proxy>
### Manual 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](https://goo.gl/PFbWqM).
- Download source distributions (`*.tar.gz`) for the library:
- <https://pypi.python.org/pypi/robotframework-imaplibrary2>
- Download PGP signatures (`*.tar.gz.asc`) for signed packages.
- Find each public key used to sign the package:
``` {.sourceCode .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:
``` {.sourceCode .console}
gpg --verify robotframework-imaplibrary2-x.x.x.tar.gz.asc robotframework-imaplibrary2-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:
``` {.sourceCode .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](https://lasselindqvist.github.io/robotframework-imaplibrary2/doc/ImapLibrary2.html)
src/
: Python source code
test/
: Test files
utest/
: Python unit test
Usage
-----
To write tests with Robot Framework and ImapLibrary, ImapLibrary must be
imported into your Robot test suite.
``` {.sourceCode .robotframework}
*** Settings ***
Library ImapLibrary2
```
See [Robot Framework User Guide](http://goo.gl/Q7dfPB) for more
information.
More information about Robot Framework standard libraries and built-in
tools can be found in the [Robot Framework
Documentation](http://goo.gl/zy53tf).
Building Keyword Documentation
------------------------------
The [Keyword Documentation](https://lasselindqvist.github.io/robotframework-imaplibrary2/doc/ImapLibrary2.html) can be found online,
if you need to generate the keyword documentation, run:
``` {.sourceCode .console}
make doc
```
or
```
python -m robot.libdoc src/ImapLibrary2 doc/ImapLibrary2.html
```
Run Unit Tests, and Test Coverage Report
----------------------------------------
Test the testing library, talking about dogfooding, let's run:
``` {.sourceCode .console}
make test
```
Deploying to Pypi
------------
``` {.sourceCode .console}
python setup.py sdist bdist_wheel
twine upload dist/*
```
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.
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](https://goo.gl/qpvnnB).
Documentation and other similar content are provided under [Creative
Commons Attribution-NonCommercial-ShareAlike 4.0 International
License](http://goo.gl/SNw73V).
Raw data
{
"_id": null,
"home_page": "https://github.com/lasselindqvist/robotframework-imaplibrary2",
"name": "robotframework-imaplibrary2",
"maintainer": null,
"docs_url": null,
"requires_python": null,
"maintainer_email": null,
"keywords": "robot framework testing automation imap email mail softwaretesting",
"author": "Lasse Lindqvist",
"author_email": "lasselindqvist@users.noreply.github.com",
"download_url": "https://files.pythonhosted.org/packages/65/fa/2b02452608c0c641ebf52c0af2b192daa4707e8d9175f11e5673c45c7e39/robotframework_imaplibrary2-0.4.10.tar.gz",
"platform": "any",
"description": "IMAP email testing library for Robot Framework\r\r\n==============================================\r\r\n\r\r\n[Docs](https://lasselindqvist.github.io/robotframework-imaplibrary2/doc/ImapLibrary2.html)\r\r\n\r\r\nIntroduction\r\r\n------------\r\r\n\r\r\nNote: This is a fork of\r\r\n<https://github.com/rickypc/robotframework-imaplibrary>\r\r\n\r\r\nImapLibrary2 is a IMAP email testing library for [Robot\r\r\nFramework](http://goo.gl/lES6WM).\r\r\n\r\r\nMore information about this library can be found in the [Keyword\r\r\nDocumentation](https://lasselindqvist.github.io/robotframework-imaplibrary2/doc/ImapLibrary2.html).\r\r\n\r\r\nIf you are interested to contribute back to this project, please see\r\r\n**Contributing** section.\r\r\n\r\r\n### Examples\r\r\n\r\r\n``` {.sourceCode .robotframework}\r\r\n*** Settings ***\r\r\nLibrary ImapLibrary2\r\r\n\r\r\n*** Test Cases ***\r\r\nEmail Verification\r\r\n Open Mailbox host=imap.domain.com user=email@domain.com password=secret\r\r\n ${LATEST} = Wait For Email sender=noreply@domain.com timeout=300\r\r\n ${HTML} = Open Link From Email ${LATEST}\r\r\n Should Contain ${HTML} Your email address has been updated\r\r\n Close Mailbox\r\r\n\r\r\nMultipart Email Verification\r\r\n Open Mailbox host=imap.domain.com user=email@domain.com password=secret\r\r\n ${LATEST} = Wait For Email sender=noreply@domain.com timeout=300\r\r\n ${parts} = Walk Multipart Email ${LATEST}\r\r\n :FOR ${i} IN RANGE ${parts}\r\r\n \\\\ Walk Multipart Email ${LATEST}\r\r\n \\\\ ${content-type} = Get Multipart Content Type\r\r\n \\\\ Continue For Loop If '${content-type}' != 'text/html'\r\r\n \\\\ ${payload} = Get Multipart Payload decode=True\r\r\n \\\\ Should Contain ${payload} your email\r\r\n \\\\ ${HTML} = Open Link From Email ${LATEST}\r\r\n \\\\ Should Contain ${HTML} Your email\r\r\n Close Mailbox\r\r\n```\r\r\n\r\r\nInstallation\r\r\n------------\r\r\n\r\r\n### Using `pip`\r\r\n\r\r\nThe recommended installation method is using\r\r\n[pip](http://goo.gl/jlJCPE):\r\r\n\r\r\n``` {.sourceCode .console}\r\r\npip install robotframework-imaplibrary2\r\r\n```\r\r\n\r\r\nThe main benefit of using `pip` is that it automatically installs all\r\r\ndependencies needed by the library. Other nice features are easy\r\r\nupgrading and support for un-installation:\r\r\n\r\r\n``` {.sourceCode .console}\r\r\npip install --upgrade robotframework-imaplibrary2\r\r\npip uninstall robotframework-imaplibrary2\r\r\n```\r\r\n\r\r\nNotice that using `--upgrade` above updates both the library and all its\r\r\ndependencies to the latest version. If you want, you can also install a\r\r\nspecific version:\r\r\n\r\r\n``` {.sourceCode .console}\r\r\npip install robotframework-imaplibrary2==x.x.x\r\r\n```\r\r\n\r\r\n### Proxy configuration\r\r\n\r\r\nIf you are behind a proxy, you can use `--proxy` command line option or\r\r\nset `http_proxy` and/or `https_proxy` environment variables to configure\r\r\n`pip` to use it. If you are behind an authenticating NTLM proxy, you may\r\r\nwant to consider installing [CNTML](http://goo.gl/ukiwSO) to handle\r\r\ncommunicating with it.\r\r\n\r\r\nFor more information about `--proxy` option and using pip with proxies\r\r\nin general see:\r\r\n\r\r\n- <http://pip-installer.org/en/latest/usage.html>\r\r\n- <http://stackoverflow.com/questions/9698557/how-to-use-pip-on-windows-behind-an-authenticating-proxy>\r\r\n- <http://stackoverflow.com/questions/14149422/using-pip-behind-a-proxy>\r\r\n\r\r\n### Manual installation\r\r\n\r\r\nIf you do not have network connection or cannot make proxy to work, you\r\r\nneed to resort to manual installation. This requires installing both the\r\r\nlibrary and its dependencies yourself.\r\r\n\r\r\n- Make sure you have [Robot Framework\r\r\n installed](https://goo.gl/PFbWqM).\r\r\n- Download source distributions (`*.tar.gz`) for the library:\r\r\n - <https://pypi.python.org/pypi/robotframework-imaplibrary2>\r\r\n- Download PGP signatures (`*.tar.gz.asc`) for signed packages.\r\r\n- Find each public key used to sign the package:\r\r\n\r\r\n``` {.sourceCode .console}\r\r\ngpg --keyserver pgp.mit.edu --search-keys D1406DE7\r\r\n```\r\r\n\r\r\n- Select the number from the list to import the public key\r\r\n- Verify the package against its PGP signature:\r\r\n\r\r\n``` {.sourceCode .console}\r\r\ngpg --verify robotframework-imaplibrary2-x.x.x.tar.gz.asc robotframework-imaplibrary2-x.x.x.tar.gz\r\r\n```\r\r\n\r\r\n- Extract each source distribution to a temporary location.\r\r\n- Go to each created directory from the command line and install each\r\r\n project using:\r\r\n\r\r\n``` {.sourceCode .console}\r\r\npython setup.py install\r\r\n```\r\r\n\r\r\nIf you are on Windows, and there are Windows installers available for\r\r\ncertain projects, you can use them instead of source distributions. Just\r\r\ndownload 32bit or 64bit installer depending on your system, double-click\r\r\nit, and follow the instructions.\r\r\n\r\r\nDirectory Layout\r\r\n----------------\r\r\n\r\r\ndoc/\r\r\n: [Keyword documentation](https://lasselindqvist.github.io/robotframework-imaplibrary2/doc/ImapLibrary2.html)\r\r\n\r\r\nsrc/\r\r\n: Python source code\r\r\n\r\r\ntest/\r\r\n: Test files\r\r\n\r\r\n utest/\r\r\n : Python unit test\r\r\n\r\r\nUsage\r\r\n-----\r\r\n\r\r\nTo write tests with Robot Framework and ImapLibrary, ImapLibrary must be\r\r\nimported into your Robot test suite.\r\r\n\r\r\n``` {.sourceCode .robotframework}\r\r\n*** Settings ***\r\r\nLibrary ImapLibrary2\r\r\n```\r\r\n\r\r\nSee [Robot Framework User Guide](http://goo.gl/Q7dfPB) for more\r\r\ninformation.\r\r\n\r\r\nMore information about Robot Framework standard libraries and built-in\r\r\ntools can be found in the [Robot Framework\r\r\nDocumentation](http://goo.gl/zy53tf).\r\r\n\r\r\nBuilding Keyword Documentation\r\r\n------------------------------\r\r\n\r\r\nThe [Keyword Documentation](https://lasselindqvist.github.io/robotframework-imaplibrary2/doc/ImapLibrary2.html) can be found online,\r\r\nif you need to generate the keyword documentation, run:\r\r\n\r\r\n``` {.sourceCode .console}\r\r\nmake doc\r\r\n```\r\r\nor\r\r\n\r\r\n```\r\r\npython -m robot.libdoc src/ImapLibrary2 doc/ImapLibrary2.html\r\r\n```\r\r\n\r\r\nRun Unit Tests, and Test Coverage Report\r\r\n----------------------------------------\r\r\n\r\r\nTest the testing library, talking about dogfooding, let's run:\r\r\n\r\r\n``` {.sourceCode .console}\r\r\nmake test\r\r\n```\r\r\n\r\r\nDeploying to Pypi\r\r\n------------\r\r\n\r\r\n``` {.sourceCode .console}\r\r\npython setup.py sdist bdist_wheel\r\r\ntwine upload dist/*\r\r\n```\r\r\n\r\r\nContributing\r\r\n------------\r\r\n\r\r\nIf you would like to contribute code to Imap Library project you can do\r\r\nso through GitHub by forking the repository and sending a pull request.\r\r\n\r\r\nWhen submitting code, please make every effort to follow existing\r\r\nconventions and style in order to keep the code as readable as possible.\r\r\nPlease also include appropriate test cases.\r\r\n\r\r\nThat's it! Thank you for your contribution!\r\r\n\r\r\nLicense\r\r\n-------\r\r\n\r\r\nCopyright (c) 2015-2016 Richard Huang.\r\r\n\r\r\nThis library is free software, licensed under: [Apache License, Version\r\r\n2.0](https://goo.gl/qpvnnB).\r\r\n\r\r\nDocumentation and other similar content are provided under [Creative\r\r\nCommons Attribution-NonCommercial-ShareAlike 4.0 International\r\r\nLicense](http://goo.gl/SNw73V).\r\r\n",
"bugtrack_url": null,
"license": "Apache License, Version 2.0",
"summary": "A IMAP email testing library for Robot Framework",
"version": "0.4.10",
"project_urls": {
"Homepage": "https://github.com/lasselindqvist/robotframework-imaplibrary2"
},
"split_keywords": [
"robot",
"framework",
"testing",
"automation",
"imap",
"email",
"mail",
"softwaretesting"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "65fa2b02452608c0c641ebf52c0af2b192daa4707e8d9175f11e5673c45c7e39",
"md5": "ca51501a7269379c8d645d2113b2818e",
"sha256": "99333c6f885086f0f9c970a0669fe964e7ad44c02ebb60bfb936c83c8a070da0"
},
"downloads": -1,
"filename": "robotframework_imaplibrary2-0.4.10.tar.gz",
"has_sig": false,
"md5_digest": "ca51501a7269379c8d645d2113b2818e",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 72403,
"upload_time": "2024-09-04T17:43:25",
"upload_time_iso_8601": "2024-09-04T17:43:25.775188Z",
"url": "https://files.pythonhosted.org/packages/65/fa/2b02452608c0c641ebf52c0af2b192daa4707e8d9175f11e5673c45c7e39/robotframework_imaplibrary2-0.4.10.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-09-04 17:43:25",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "lasselindqvist",
"github_project": "robotframework-imaplibrary2",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "robotframework-imaplibrary2"
}