Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Self managed connections

Open
#187 5 comments 0 reactions 1 assignee View on GitHub

@amochin is already working on this.

Since Oct 21, 2025.

Assessment

This issue has not been assessed yet.

Description

improvement

One of the major problems with using libraries like DatabaseLibrary is managing the connection. If we implement #149, it could cause additional problems. Typically QA need to implement following logic:

Connect To Database  (...)
Query
[Teardown]    Disconnect Connection

But often Disconnect Connection is not in teardown (so the connection can remain open after test fails), we could several long running connections even if we're not querying for anything. For that reason we could add optional option for 'self managed connection' - in short, we could open and close connection each time we perform an query.

The default behaviour of the library will not change, it will be only extra option that will open/close connection if it doesn't exist.

*** Settings ***
Library    DatabaseLibrary    auto_connect=${True}
Suite Setup    Configure Connection    ${params}  # need to configure default connection

*** Test Cases ***
Test 1
    Query    SELECT * FROM table1  # will open and close connection on its own

Test 2
    Query    SELECT * FROM table2  # will open and close connection on its own
Dominant language
Python
Stars
179
Forks
178
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from MarketSquare/Robotframework-Database-Library

All issues in MarketSquare/Robotframework-Database-Library

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.