### Method

# Gio TestDBus up

since: 2.34

#### Declaration

    void
    g_test_dbus_up (
      GTestDBus* self
    )

#### Description

Start a dbus-daemon instance and set DBUS_SESSION_BUS_ADDRESS. After this call, it is safe for unit tests to start sending messages on the session bus.

If this function is called from setup callback of g_test_add(), `g_test_dbus_down()` must be called in its teardown callback.

If this function is called from unit test’s main(), then `g_test_dbus_down()` must be called after g_test_run().

Available since: 2.34