All of lore.kernel.org
 help / color / mirror / Atom feed
From: Antti =?unknown-8bit?q?Kaijanm=C3=A4ki?= <antti.kaijanmaki@canonical.com>
To: ofono@ofono.org
Subject: Re: [PATCH 1/2] Allow users to specify dbus name replacement behaviour.
Date: Fri, 04 Apr 2014 04:16:43 +0300	[thread overview]
Message-ID: <533E07FB.9020900@canonical.com> (raw)
In-Reply-To: <533DFBF9.9050906@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 3478 bytes --]

On 04.04.2014 03:25, Denis Kenzior wrote:
>> The number of modems returned by org.ofono.Manager.GetModems() must
>> represent the total number of modems available to the system and thus we
>> need to have exactly two modems when testing dual-sim features etc.
>>
> 
> Sounds like your system is a bit inflexible, but okay.

The system is not inflexible, but we need to be able to set up the
environment for each test case according to the test plan.

As an example, not actual test plans:


= Test 1 =

Prerequisites:
 - number of modems: 1
   - modem 1
     - ID: Personal

Step 1:
Incoming call comes in on modem 1.
Verify:
 - notification of incoming call is shown
 - incoming call number is shown
 - the notification does not contain the ID of the modem
   receiving the call.

Step 2:
Accept the incoming call through the notification
Verify:
 - call interface shows up
 - call interface shows the incoming number
 - call interface does not show the modem ID

Step 3:
Hang up the call
Verify:
 - call is terminated
 - call interface turns to dialer interface
 - dialer interface does not show the Modem ID


= Test 1 =

Prerequisites:
 - number of modems: 2
   - modem 1
     - ID: Personal
   - modem 2
     - ID: Work

Step 1:
Incoming call comes in on modem 2.
Verify:
 - notification of incoming call is shown
 - incoming call number is shown
 - the notification contains the Modem ID "Work"

Step 2:
Accept the incoming call through the notification
Verify:
 - call interface shows up
 - call interface shows the incoming number
 - call interface shows the Modem ID "Work"

Step 3:
Hang up the call
Verify:
 - call is terminated
 - call interface turns to dialer interface
 - dialer interface allows to choose between two modems
   with IDs "Personal" and "Work"

Now, we have testing framework in place that we can do these tests in an
automated manner, testing the whole stack down from ofono up to the
final application that handles the phone calls, inspecting different
components that are visible on the screen no matter where they come from
(notifications from the notification system, applications, any shell
component..)

Now to run these tests in arbitrary order we need to be able to set up
the testing environment for each test individually.

For Test 1 we need oFono to expose a single modem for the duraction of
the test and through that modem we emulate the phone call and also
verify that the call gets terminated when the button in call interface
is pushed.

Test 2 is ran straight after Test 1 and for that we need to change the
number of modems to two and have them individually configured with
proper phonesim .xml files in between the two tests.


>> The need to change the number of modems during testing comes from the
>> fact that our test suite has the single and multimodem tests together
>> and runs them one after another and we need to be able to set up the
>> environment appropriately in between individual test cases.
>>
> 
> Why don't you simply write a plugin that handles all of this?  E.g.
> canonical_tester that creates two modem instances.  If you must insist
> on having exactly 1 or 2 modems, then just add a DBus interface to
> switch between modes.
> 
> Adding a control mechanism for controlling the number of phonesim
> instances seems like total overkill.

Yes, agreed. The DBus interface is the way to go.




  reply	other threads:[~2014-04-04  1:16 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-02 13:56 [PATCH 1/2] Allow users to specify dbus name replacement behaviour jussi.pakkanen
2014-04-02 13:56 ` [PATCH 2/2] Can set name replacement with command line arguments jussi.pakkanen
2014-04-02 18:39 ` [PATCH 1/2] Allow users to specify dbus name replacement behaviour Marcel Holtmann
2014-04-03  7:38   ` Jussi Pakkanen
2014-04-03  9:41     ` Antti =?unknown-8bit?q?Kaijanm=C3=A4ki?=
2014-04-03 17:55       ` Marcel Holtmann
2014-04-03 23:45         ` Antti =?unknown-8bit?q?Kaijanm=C3=A4ki?=
2014-04-04  0:09           ` Antti =?unknown-8bit?q?Kaijanm=C3=A4ki?=
2014-04-04  0:13             ` Denis Kenzior
2014-04-04  0:11           ` Denis Kenzior
2014-04-04  0:50             ` Antti =?unknown-8bit?q?Kaijanm=C3=A4ki?=
2014-04-03 21:40       ` Denis Kenzior
2014-04-04  0:00         ` Antti =?unknown-8bit?q?Kaijanm=C3=A4ki?=
2014-04-04  0:22         ` Antti =?unknown-8bit?q?Kaijanm=C3=A4ki?=
2014-04-04  0:25           ` Denis Kenzior
2014-04-04  1:16             ` Antti =?unknown-8bit?q?Kaijanm=C3=A4ki?= [this message]
2014-04-03 17:50     ` Marcel Holtmann

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=533E07FB.9020900@canonical.com \
    --to=antti.kaijanmaki@canonical.com \
    --cc=ofono@ofono.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.