summaryrefslogtreecommitdiff
path: root/TODO
blob: 02fbd4498f3af5fa6c5599caf5c7baf9acbca427 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79

Tasks
=====

* Test switch

* Sort out naming & coding convention and write up in tree.

* Discuss copyright of Jonathan's contributions with Robert.

* Test exceptions being raised from make and clean


Questions
=========

* Why does finishedWith take a parameter? Why not use
  TestResource._currentResource?

* How should resources be composed?

* How can testresources be used with layers?

* How can testresources be used to *replace* layers?


Bugs
====



Ideas
=====

* Have a dumb equivalent of OptimisingTestSuite that doesn't do any sorting.
  Rely on others to do the sorting first.

* Introduce timing hooks for better estimation of setUpCost and tearDownCost.

* Store timing information so that cost estimations can improve over time.

* Change the interface of TestResource so that make and clean are methods on
  some *other* object, rather than methods to be overridden. This object could
  well have the interface .setUp() and .tearDown()!

* Move ResourcedTestCase.setUpResources and tearDownResources to be methods.

* Change ResourcedTestCase.resources to a dict (currently a list of 2-tuples).

* There are now many simple test helpers. These can probably be consolidated.

* We want to support adding other "special" test suites to
  OptimisingTestSuite. In particular, if we add a test suite that provides
  services to its tests to an OptimisingTestSuite, adsorbSuite should not
  totally flatten the suite, but instead keep the suite, even if it changes
  the structure of the tests.

  e.g. addTest maintains the structure:
    >>> OptimisingTestSuite().addTest(SpecialSuite([a, b]))._tests
    [SpecialSuite([a, b])]

  Currently, adsorbSuite destroys all suite structure:
    >>> OptimisingTestSuite().adsorbSuite(SpecialSuite([a, b]))._tests
    [a, b]

  Instead, it should preserve the suite while changing the structure:
    >>> OptimisingTestSuite().adsorbSuite(SpecialSuite([a, b]))._tests
    [SpecialSuite(a), SpecialSuite(b)]

  All of the tests in each of the resulting new SpecialSuites should have
  identical resource requirements so we can still optimise.

  Once it does this, we should deprecate adsorbSuite and move this
  functionality to addTest / addTests.

* 'TestResource' isn't a very good name. Since the switch to instance-based
  resources, it's even worse, since the objects are more like resource
  factories or resource managers. Other possible names involve 'asset',
  'liability' or 'fixture'.