Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Andreas Naumann <dev@andin.de>
To: buildroot@busybox.net
Subject: [Buildroot] Buildroot runtime test infrastructure prototype
Date: Tue, 30 Jun 2015 09:06:25 +0200	[thread overview]
Message-ID: <55923FF1.4010700@andin.de> (raw)
In-Reply-To: <20150628115001.098430d1@free-electrons.com>

Hi Thomas,

Am 28.06.2015 um 11:50 schrieb Thomas Petazzoni:

> the answers was Robot Framework. So I had a quick look, and definitely
> could not understand how it can work: you are apparently not writing
> the tests in some real programming language, but in some sort of weird
> "tabular" format. I really don't understand how you can express
> complicated test scenarios with such a limited language.
>
> The Python unittest stuff just runs Python code, so you can express
> whatever complicated test logic you want.

RFW also runs plain Python code, the only difference is, it does it 
exclusively via its internal, external or user-written libraries. The 
libraries are simply Python classes with function calls like 
open_connection(self, host, port=23, prompt, ...) or 
execute_command(self, command, loglevel=None) .
In the RFWs tabular format this then looks like
Open Connection | 192.168.0.37 | prompt=[root]#
Login           | root         | pw
Execute Command | echo Hello World

which in an HTML table is quite readable. RFW calls it keywords. You can 
also create custom keywords consisting of any other keywords.
So while the libraries are the equivalent of the fixtures that Thomas S. 
was talking about, you can group keywords that form certain steps into 
domain specific resource files, like filesystem, package, qemu...
Using those higher level keywords you then can hide the lengthy 
parameter set from the top level testcase table, which leads e.g. to 
something like:
Buildroot.Add Package To Defconfig | dropbear
Buildroot.Compile
Qemu.Start System
Telnet.Connect And Login
Command Output Should Contain | netstat -ltn 2 | 0.0.0.0:22

There is another resource type, Variables, which allows for 
configuration of keywords and testcases but before explaining any 
longer, I'll try to come up with a working example...

regards,
Andreas

  reply	other threads:[~2015-06-30  7:06 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-25 18:02 [Buildroot] Buildroot runtime test infrastructure prototype Thomas Petazzoni
2015-06-26 15:48 ` Andreas Naumann
2015-06-26 16:20   ` Jeremy Rosen
2015-06-28  9:50     ` Thomas Petazzoni
2015-06-30  7:06       ` Andreas Naumann [this message]
2015-06-30  7:39         ` Thomas Petazzoni
2015-06-30  8:38           ` Jeremy Rosen
2015-06-30  8:46             ` Thomas Petazzoni
2015-06-30 20:26             ` Andreas Naumann
2015-07-01  8:53               ` Jeremy Rosen
2015-06-30 16:06       ` Jeremy Rosen
2015-07-01  7:30         ` Andreas Naumann
2015-07-01  7:57           ` Jeremy Rosen
2015-07-01 10:28           ` Denis Thulin
2015-07-02 13:57             ` Andreas Naumann
2015-06-26 18:12 ` Thomas De Schampheleire
2015-06-26 18:26   ` Thomas De Schampheleire

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=55923FF1.4010700@andin.de \
    --to=dev@andin.de \
    --cc=buildroot@busybox.net \
    /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