Search GimmeJob

Type at least 2 characters. Enter also searches by meaning.
GimmeJob
Sign in
Testing tools: hands-on guides · Chapter 08 / 09

Testing Tools

DBeaver

DBeaver is a universal database client. One app connects to PostgreSQL, MySQL/MariaDB, SQL Server, Oracle, SQLite, ClickHouse and dozens of other databases through JDBC drivers. QA engineers use it to answer one question: does the stored data agree with what the API and UI claim? It's also where an accidental UPDATE without a WHERE can do real damage, so this chapter starts the safety settings early.

Key factDetails
EditionsCommunity Edition (free, open source) and paid Lite / Enterprise / Ultimate editions
PlatformsWindows, macOS, Linux
Best forVerifying persisted state, preparing test data, reading execution plans, exporting evidence
Shortcuts belowWindows/Linux. On macOS use Cmd instead of Ctrl
Create the connection (right driver, right environment) → set the connection type (Production = manual commit + confirmations) → SELECT with precise WHERE + LIMIT → compare with API/UI evidence → (test DB only) change data inside a transaction → commit or roll back → export the evidence

Creating a connection: driver, host, credentials and Test Connection

  1. Click New Database Connection (the plug icon with a plus, or Database → New Database Connection, Ctrl+Shift+N).
  2. Choose the database type, such as PostgreSQL, and click Next.
  3. On the Main tab enter Host, Port (PostgreSQL 5432, MySQL 3306, SQL Server 1433), Database, Username and Password.
  4. Click Test Connection…. The first time, DBeaver offers to download the driver files. Accept.
  5. Use the SSH tab if the database is reachable only through a bastion host, and the SSL tab if the server requires TLS.
  6. Click Finish. The connection appears in Database Navigator. Expand it to browse schemas, tables, views and functions.
QA tip: Put the environment in the connection name, for example orders-db STAGE (read-only). Five similar connections in the Navigator are an accident waiting to happen.

Safe by default: connection types, manual commit and read-only

Connection types decide how careful DBeaver is. There are three built-in types:

SettingDevelopmentTestProduction
Auto-commitOnOnOff
Confirm SQL executionOffOffOn
Confirm data changesOffOnOn
Colour in the UIWhiteOlive greenBrick red

New connections are Development by default. To change it:

  1. Select the connection in Database Navigator and press F4 (or right-click → Edit Connection).
  2. Go to General and set Connection type to Production for anything shared or live.
  3. In the same General page, tick Read-only connection when you only need to look. DBeaver then refuses data-changing statements on that connection.
  4. Click OK. The connection, its editors and tabs are now coloured, so you can always see where you are.
DBeaver connection settings, General page
Official DBeaver documentation screenshot: the General page of the connection settings with the Connection type field.

Manual commit mode makes every change a transaction that you must finish yourself:

  1. Use the transaction mode button in the main toolbar to switch from Auto-Commit to Manual Commit.
  2. Run your INSERT / UPDATE / DELETE. DBeaver shows a counter of pending statements.
  3. Check the result with a SELECT in the same editor.
  4. Click Commit to keep the changes or Rollback to undo them.
Caveat: Even on a read-only connection, a heavy SELECT without a LIMIT on a large production table can slow the database for everyone. Filter by an indexed column and limit the rows.

SQL editor: run statements, scripts and parameters

  1. Select the connection and choose SQL Editor → New SQL Editor in the main menu, or press F3 and click New Script. Saved scripts appear in the Scripts folder of the Project Explorer.
  2. Check the active connection and schema in the main toolbar before you run anything. Ctrl+9 switches the connection and Ctrl+0 switches the schema.
  3. Put the cursor inside a statement and press Ctrl+Enter to run only that statement. Select several lines first to run just the selection.
  4. Press Alt+X to run the whole script. Each result opens in its own tab, and Statistics summarises the run.
  5. Press Ctrl+\ to run a statement into a new results tab and keep the previous result for comparison.
  6. Use named parameters such as :order_id. When you run the query, DBeaver opens a Bind parameter(s) window to enter the values. Variables set with @set id = 42 can be used as ${id}.
SQL
SQLite · sample DB · browser sandbox
Result
Run the query to see the result.
DBeaver SQL editor with script and results panels
Official DBeaver documentation screenshot: the SQL editor with the script panel, toolbar and results panel.
DBeaver Bind parameters dialog
Official DBeaver documentation screenshot: entering values for named query parameters.

Data editor: filter, sort, compare and edit rows

Double-click a table in Database Navigator and open the Data tab, or use the results grid of any query.

  1. Type a condition in the filter box above the grid, for example status = 'FAILED' AND created_at > '2026-11-01', and press Enter. It works like a WHERE clause without writing a query.
  2. Click a column header to sort, or use the funnel icon in the header to filter by a value.
  3. Select a cell and open the value panel to read long text or JSON comfortably.
  4. Switch between Grid and Text view (left side of the results) when you want to copy a plain-text table.
  5. To edit (test databases only!), double-click a cell, change the value, and click Save at the bottom. With Confirm data changes on, DBeaver shows the generated SQL first.
  6. Use Advanced Copy (Ctrl+Shift+C) to copy selected rows together with the column names, ready to paste into a bug report or spreadsheet.
QA tip: Check the timestamps as well as the values: created_at, updated_at and their time zone. "Saved with the wrong status" and "saved with the right status, then overwritten by a background job" are different bugs.

Execution plans, ER diagrams and exporting evidence

Execution plan (why is this query or endpoint slow?):

  1. Place the cursor in a query and press Ctrl+Shift+E, or click Explain execution plan in the editor toolbar.
  2. DBeaver shows the plan tree as a result tab. Look for sequential/full scans on large tables and very high cost or row estimates.
  3. Click a node to see its details. Attach the plan when you report a slow endpoint, because developers will ask for it.

ER diagram: open a table and switch to the ER Diagram tab, or right-click a schema → View Diagram, to see foreign keys and relationships. This helps you write correct joins and spot missing constraints, such as an order that can exist without a customer.

Export results:

  1. Right-click the query → Execute → Export From Query, or right-click a result grid → Export data….
  2. Choose a format: CSV, JSON, XLSX, SQL INSERT statements, Markdown and others.
  3. Follow the Data transfer wizard (file name, encoding, which columns), then click Proceed.
DBeaver Export From Query menu
Official DBeaver documentation screenshot: exporting a query result directly to a file.
Caveat: Exports often contain personal data: emails, names, addresses, phone numbers. Mask or remove those columns before you attach a file to a ticket.

Cheat sheet

TaskHow
New connectionCtrl+Shift+N → choose driver → Test Connection
Edit connection settingsSelect it → F4
Make a connection safeF4 → General → Connection type Production and/or Read-only connection
Manual transactionsToolbar → Manual Commit, then Commit / Rollback
New SQL scriptSQL Editor → New SQL Editor, or F3 → New Script
Switch connection / schemaCtrl+9 / Ctrl+0
Run statement under cursorCtrl+Enter
Run whole scriptAlt+X
Result in a new tabCtrl+\
Explain planCtrl+Shift+E
Quick WHERE on a tableFilter box above the data grid
Copy with headersCtrl+Shift+C (Advanced Copy)
ExportExecute → Export From Query
Hands-on lab: verify persisted state safely on a throwaway PostgreSQL

You need Docker and DBeaver Community.

  1. Start a disposable database with the first command after this list.
  2. In DBeaver: New Database Connection → PostgreSQL → host localhost, port 5432, database postgres, user postgres, password qa → Test Connection (download the driver) → Finish. Name it qa-lab LOCAL.
  3. Open a new script (SQL Editor → New SQL Editor), paste the setup SQL after this list, and run it with Alt+X.
  4. Run the duplicate-payment check from the SQL editor section with Ctrl+Enter. It should report order 1 with 2 payments. That is the "double click" bug.
  5. Switch the toolbar to Manual Commit. Run DELETE FROM payments WHERE id = 3; and check the result with SELECT * FROM payments;. Click Rollback and confirm that the row is back.
  6. Press F4 on the connection → General → set Connection type to Production. Run an UPDATE. DBeaver now asks for confirmation. Cancel it.
  7. Put the cursor on SELECT * FROM payments WHERE order_id = 1; and press Ctrl+Shift+E to see the execution plan. Note the scan type.
  8. Export the duplicate-payment result as CSV (Execute → Export From Query). Then stop the container with docker rm -f qa-pg.
docker run --name qa-pg -e POSTGRES_PASSWORD=qa -p 5432:5432 -d postgres:17
CREATE TABLE orders   (id int PRIMARY KEY, status text NOT NULL, total_amount numeric(10,2));
CREATE TABLE payments (id int PRIMARY KEY, order_id int REFERENCES orders(id),
                       amount numeric(10,2), created_at timestamptz DEFAULT now());
INSERT INTO orders   VALUES (1,'PAID',49.90),(2,'NEW',10.00);
INSERT INTO payments VALUES (1,1,49.90,now()),(2,2,10.00,now()),(3,1,49.90,now());

Official DBeaver connection types · SQL execution

Summary

  • Name connections after the environment, and set shared or live ones to the Production connection type (manual commit plus confirmations), or make them read-only.
  • Run precise SELECT statements with Ctrl+Enter, use :parameters for reusable checks, and compare database state with what the API and UI reported.
  • On test databases, change data inside a manual transaction and commit or roll back on purpose.
  • Use execution plans for slow endpoints and ER diagrams for relationships, and export results without personal data.

Source registry

Verified 22 Nov 2026
DBeaver documentation

Connections, Database Navigator, SQL editor and data editor

DBeaver Corp · verified
Source ↗
DBeaver: Connection types

Development, Test and Production defaults for auto-commit, confirmations and colours

DBeaver Corp · verified
Source ↗
DBeaver: SQL Editor

Opening new SQL scripts, switching the active connection and schema, and the editor layout

DBeaver Corp · verified
Source ↗
DBeaver: SQL execution

Executing statements and scripts, results tabs, parameters, variables and Export From Query

DBeaver Corp · verified
Source ↗
DBeaver wiki: Query execution plan

Explaining the execution plan of the query under the cursor

DBeaver Corp · verified
Source ↗
PostgreSQL tutorial: The SQL language

Basic SELECT, joins and aggregates used in verification queries

PostgreSQL Global Development Group · verified
Source ↗
PostgreSQL tutorial: Transactions

BEGIN, COMMIT and ROLLBACK semantics behind manual commit mode

PostgreSQL Global Development Group · verified
Source ↗