aboutsummaryrefslogtreecommitdiff
path: root/adapters.go
blob: 7c7dd0bd914ec39edfe43cfde19310d59ddf10f1 (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
package planr

// Test adapters must implement all life cycle hooks
// This allows common config, code generation, etc
// Test cases matching adapter configurations will be
// fed into the adapter interface
type Adapter interface {
  
  /* CONFIGURATION HOOKS */

  Config() AdapterConfig

  /* BUILD CYCLE */

  // Called once at the beginning of the build process
  InitializeBuild()
  // Called once with every registered test case
  // Can access configuration directly
  Build(testCase TestCase)
  // Called once after all builds
  FinalizeBuild()
  // Called pre-evaluate
  Make()
  // Called once per test case after FinalizeBuild
  Evaluate(testCase TestCase) TestResult
  // Called once after each test has been evaluated
  Cleanup()
}