Package: robotframework-dynamodbsqllibrary
IntroductionDynamoDB SQL Library is a big data testing library forRobot Frameworkthat gives you the capability to execute scan and query operations against
multiAmazon DynamoDBsessions simultaneously using aSQL-likeDSL.It leverages DynamoDB Query Languange (DQL) internally to provide aSQL-likeDSLforAmazon DynamoDB.More information about DQL queries can be found in theDQL Queries Documentation.More information about this library can be found in theKeyword Documentation.ExampleCreate DynamoDB Sessionus-west-2label=oregonCreate DynamoDB Sessionap-southeast-1label=singaporeCreate DynamoDB Sessioneu-central-1label=frankfurtQuery DynamoDBoregonCREATE TABLE mine (id STRING HASH KEY)Query DynamoDBsingaporeCREATE TABLE mine (id STRING HASH KEY)Query DynamoDBfrankfurtCREATE TABLE mine (id STRING HASH KEY)DynamoDB Table Should ExistoregonmineDynamoDB Table Should ExistsingaporemineDynamoDB Table Should ExistfrankfurtmineQuery DynamoDBoregonINSERT INTO mine (id) VALUES (‘oregon’)Query DynamoDBsingaporeINSERT INTO mine (id) VALUES (‘singapore’)Query DynamoDBfrankfurtINSERT INTO mine (id) VALUES (‘frankfurt’)@{oregon} =Query DynamoDBoregonSCAN mine@{singapore} =Query DynamoDBsingaporeSCAN mine@{frankfurt} =Query DynamoDBfrankfurtSCAN mineList And JSON String Should Be Equal${oregon}[{“id”:”oregon”}]List And JSON String Should Be Equal${singapore}[{“id”:”singapore”}]List And JSON String Should Be Equal${frankfurt}[{“id”:”frankfurt”}]Delete All Dynamodb SessionsConfig and Credentials FileSet up config file in default location:~/.aws/config (Linux/Mac)%USERPROFILE%.aws\config (Windows)[default]region=us-east-1Set up credentials file in default location:~/.aws/credentials (Linux/Mac)%USERPROFILE%.aws\credentials (Windows)[default]aws_access_key_id=YOUR_KEYaws_secret_access_key=YOUR_SECRET[another_profile]aws_access_key_id=ANOTHER_KEYaws_secret_access_key=ANOTHER_SECRETregion=us-west-1InstallationUsingpipThe recommended installation method is usingpip:python-mpipinstallrobotframework-dynamodbsqllibraryThe main benefit of usingpipis that it automatically installs all
dependencies needed by the library. Other nice features are easy upgrading
and support for un-installation:python-mpipinstall--upgraderobotframework-dynamodbsqllibrarypython-mpipuninstallrobotframework-dynamodbsqllibraryNotice that using--upgradeabove updates both the library and all
its dependencies to the latest version. If you want, you can also install
a specific version or upgrade only thedqlpackage used by the library:python-mpipinstallrobotframework-dynamodbsqllibrary==x.x.xpython-mpipinstall--upgradedqlpython-mpipinstalldql==x.x.xProxy configurationIf you are behind a proxy, you can use--proxycommand line option
or sethttp_proxyand/orhttps_proxyenvironment variables to
configurepipto use it. If you are behind an authenticating NTLM proxy,
you may want to consider installingCNTMLto handle communicating with it.For more information about--proxyoption and using pip with proxies
in general see:https://pip.pypa.io/en/stable/cli/pip/#cmdoption-proxyhttps://stackoverflow.com/questions/9698557/how-to-use-pip-on-windows-behind-an-authenticating-proxyhttps://stackoverflow.com/questions/14149422/using-pip-behind-a-proxyManual installationIf 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 haveRobot Framework installed.Download source distributions (*.tar.gz) for the library and its dependencies:https://pypi.python.org/pypi/robotframework-dynamodbsqllibraryhttps://pypi.python.org/pypi/dqlDownload PGP signatures (*.tar.gz.asc) for signed packages.Find each public key used to sign the package:gpg--keyserverpgp.mit.edu--search-keysD1406DE7Select the number from the list to import the public keyVerify the package against its PGP signature:gpg--verifyrobotframework-dynamodbsqllibrary-x.x.x.tar.gz.ascrobotframework-dynamodbsqllibrary-x.x.x.tar.gzExtract each source distribution to a temporary location.Go to each created directory from the command line and install each project using:pythonsetup.pyinstallIf 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 Layoutdoc/Keyword documentationsrc/Python source codetest/Test filesatest/Robot Frameworkacceptance testutest/Python unit testUsageTo write tests with Robot Framework and DynamoDB SQL Library,
DynamoDB SQL Library must be imported into your Robot test suite.
SeeRobot Framework User Guidefor more information.More information about Robot Framework standard libraries and built-in tools
can be found in theRobot Framework Documentation.Building Keyword DocumentationTheKeyword Documentationcan be found online, if you need to generate the keyword documentation, run:makedocRun Unit Tests, Acceptance Tests, and Test Coverage ReportTest the testing library, talking about dogfooding, let’s run:maketestContributingIf you would like to contribute code to DynamoDB SQL Library repository, you can do so through GitHub by forking the repository and sending a pull request.If you do not agree toContribution Agreement, do not contribute any code to DynamoDB SQL Library repository.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!LicenseCopyright (c) 2014 - 2023 Richard Huang.This library is free software, licensed under:GNU Affero General Public License (AGPL-3.0).Documentation and other similar content are provided underCreative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.