From: Tal <jkarni@gmail.com>
To: linux-bluetooth@vger.kernel.org
Subject: Integration (-ish) testing with BlueZ D-Bus API
Date: Mon, 13 Mar 2017 11:19:52 -0600 [thread overview]
Message-ID: <20170313171952.sqmm6fhqranalkf7@Tal> (raw)
[-- Attachment #1: Type: text/plain, Size: 1411 bytes --]
Hey list,
I just wrote a little Haskell library wrapping the GATT API [0]. It's been a
surprisingly smooth experience - thanks for the API and documentation!
One issue that remains, though, is decent testing. Right now the tests limit
themselves to calling d-bus methods and just checking that they don't throw an
error. I don't see how I can do more than that - check that BlueZ in fact
registered an application with the data I'm expecting, or check that it's
handling notifications, etc. (Without, that is, pulling out my phone and trying
it manually.) Tapping into dbus-monitor in some cases would provide some help,
but everyone who wants to run the tests would need there dbus config files, the
tests would have to run as root, I'd have to do fairly fragile parsing of the
logs that would still only approximate the properties I really want to check
for.
If I could register an application on a computer and interact with it as if
it were a remote peripheral (essentially having the computer be both the
central and the peripheral), then testing would be much easier and more
comprehensive. In this particular case, I know the communication would only go
as far as DBus, and not through the hardware layers of the bluetooth stack, but
that's okay.
Is this at all possible?
[0] http://hackage.haskell.org/package/ble
--
Julian K. Arni
Haskell Consultant, Turing Jump
https://turingjump.com
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 455 bytes --]
next reply other threads:[~2017-03-13 17:19 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-13 17:19 Tal [this message]
2017-03-13 18:33 ` Integration (-ish) testing with BlueZ D-Bus API Barry Byford
2017-03-15 2:11 ` Tal
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170313171952.sqmm6fhqranalkf7@Tal \
--to=jkarni@gmail.com \
--cc=linux-bluetooth@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox