← Back to team overview

touch-packages team mailing list archive

[Bug 1447206] Re: in autopilot tests, UnityTestCase setup is too big and complicated

 

Currently the fake sensors setup is implemented as one big fixture.
This duplicates some of the code in the base test case setup. We should extract some parts of the fake sensors setup into a base fixture, and use it in the base class.

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to unity8 in Ubuntu.
https://bugs.launchpad.net/bugs/1447206

Title:
  in autopilot tests, UnityTestCase setup is too big and complicated

Status in unity8 package in Ubuntu:
  New

Bug description:
  The UnityTestCase setup in autopilot tests does a lot of things to
  prepare the environment and it has some conditionals to change the
  behaviour depending on the tests being run.

  This makes the setup too complicated and hard to reuse in other tests.
  If we inherit from that test case, we inherit the setup, so this it's
  not a good base to start new tests.

  An alternative is to write the setup as multiple fixtures, one per
  each environment detail we need. Fixtures allow to extend test cases
  by composition, so you choose the parts you want in each test, making
  the environment clearer.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/unity8/+bug/1447206/+subscriptions


References