Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 14 Feb 2015 13:57:50 -0800
From:      Craig Rodrigues <rodrigc@freebsd.org>
To:        Alan Somers <asomers@freebsd.org>
Cc:        freebsd-testing@freebsd.org
Subject:   Re: Python unittest backend for Kyua
Message-ID:  <20150214215750.GA5065@rodrigc-laptop1>
In-Reply-To: <CAOtMX2g35ybAzFHriVuQqYMGq5Snm0%2BEcUWNhQgEr%2Bqx1xYpcA@mail.gmail.com>
References:  <CAOtMX2g35ybAzFHriVuQqYMGq5Snm0%2BEcUWNhQgEr%2Bqx1xYpcA@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help

--fUYQa+Pmc3FrFX/N
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Tue, Nov 26, 2013 at 09:47:29PM -0700, Alan Somers wrote:
> I wrote a Kyua backend for Python programs that use the unittest
> module from the standard library.  It's incomplete (no man page, no
> tests, no test case isolation, and no tested version of python other
> than 2.7), but I'm posting it to discuss the approach.  Do you think
> it's a good start?
>=20
> Rather than use unittest's CLI, I wrote the backend to dynamically
> load the file under test and interrogate the test using unittest as a
> library.  This allowed more intimate access.  For example, the
> unittest CLI doesn't have a "list" command, but the backend can still
> list tests.
>=20
> Does it look good so far?
>=20
> -Alan

Alan,

I saw this post of yours from a while back.
I was just wondering, how far did you get with it?  Do you use
it in your company?

I looked at three Python testing frameworks:
     (1) unittest https://docs.python.org/2/library/unittest.html
     (2) nose  https://nose.readthedocs.org
     (3) pytest http://pytest.org

I found that pytest was the easiest to set up and did what I needed:
    -> test discovery
    -> generate XML test result output compatible with Jenkins
    -> tests do not need to inherit from any base classes,
       and just requires a file with "test_*" methods

The test discovery makes it somewhat "kyua-like".


Do you have any opions/experience with this?

My experience is that running the FreeBSD tests in kyua work great.
However, for a full product, I've had a really hard time getting
QA people to be able to get comfortable writing new ATF tests and Kyuafiles.
I've had less problems withe the Python frameworks.

--
Craig=20

--fUYQa+Pmc3FrFX/N
Content-Type: application/pgp-signature

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iEYEARECAAYFAlTfxN4ACgkQ0gqKKjmYR53a/QCgiJc0f3SrlB5FJ3JM/5DCFQDM
z/kAoJwiTdg1v5DAnCA7eA/MDpjI3FQL
=Ftmb
-----END PGP SIGNATURE-----

--fUYQa+Pmc3FrFX/N--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20150214215750.GA5065>