Skip to content

1.1.0

Latest

Choose a tag to compare

@MobyNL MobyNL released this 13 Aug 12:58
· 14 commits to main since this release

Widens the supported versions to Robot Framework 5.0 – 7.x on Python 3.10 – 3.14, adds Secret support for credentials, and documents how to actually enable AWS authentication.

pip install robotframework-mongodb

📖 Keyword documentation

Robot Framework 5.0 and later

The constraints previously allowed only Robot Framework 7.3+ on Python 3.12+. The library needed no code change for this — everything it imports from robot other than Secret predates 5.0, Secret was already imported conditionally, and the keyword annotations are ones 5.0 converts. The pins were the only thing keeping older versions out.

On 5.0 through 6.0, pair it with the assertion engine's 2.x line, because 3.x requires Robot Framework 6.1.1:

pip install robotframework-mongodb "robotframework==5.0.1" "robotframework-assertion-engine==2.0.0"

The upper end of the range matters as much as the lower: the previous ^3.0.3 excluded the assertion engine's 4.x and 5.x lines, which work and which other Robot Framework libraries depend on — installing alongside Browser would have been an unsatisfiable conflict.

Secrets for credentials

On Robot Framework 7.4 and later, db_password and db_conn_string accept a Secret, so the value is written to log.html and output.xml as <secret> rather than as itself. A secret can only be built from an environment variable, so there is no way to write the value into the suite by accident. Below 7.4 both arguments take a plain string, exactly as before.

The AWS documentation was wrong

If you tried to use AWS authentication before this release, it silently did not work.

  • Enabling it was never documented. It needs authMechanism=MONGODB-AWS together with authSource=$external, and neither appeared in the README or the keyword documentation. The documented example was a connection string with nothing AWS-specific in it, so it authenticated with SCRAM instead. Both are now documented, including that auth_mechanism and auth_source already reach them as keyword arguments — no connection string is required for IAM.
  • Amazon DocumentDB and AWS IAM are now separate sections, because they are independent choices rather than one path. DocumentDB's own requirements are documented for the first time: TLS against Amazon's CA bundle, and retryWrites=false, which is required and without which every write fails.
  • The keyword documentation claimed the library reads AWS_ACCESS_KEY_ID and friends. It reads none of them: pymongo-auth-aws resolves credentials, and an EC2, ECS, EKS or Lambda role is used with no credentials at all. It also told you to install pymongo[aws], which installs pymongo's extra and leaves this package's alone — the extra it meant is robotframework-mongodb[aws].

Also

  • A new Importing section documents coerce_object_ids, the only import-time argument, and the GLOBAL scope — including that two suites importing with different values get separate instances, and therefore separate connection pools rather than shared connections.
  • Fixed: the unit test file covering the keywords ran no tests at all on Robot Framework 7.3 and older. A module-level pytest.importorskip for Secret raised at import, so all 126 tests were skipped and reported as a single skip.

The changelog has the full detail.