func (c *controllerImpl) RunAll() string {
	_, _, stats := c.runSet(".*")
	for _, stat := range stats {
		if stat.Failed {
			return constants.ResultFail
		}
	}
	return constants.ResultPass
}
Run all tests
package controller
import (
	"fmt"
	"log"
	"testing"
	"github.com/mercari/testdeck/constants"
	"github.com/mercari/testdeck/runner"
	"github.com/mercari/testdeck/service/config"
	"github.com/mercari/testdeck/service/db"
)
type Controller interface {
	RunLocal() int
	RunAll() string
	Run(name string) (constants.Statistics, []int, bool)  
	Runner() runner.Runner
	SetPrintToStdout(bool)
}
type controllerImpl struct {
	m      *testing.M
	runner runner.Runner
	g      *db.Db
	env    *config.Env
}
func New(m *testing.M, g *db.Db, env *config.Env) Controller {
	runner := runner.Instance(m)
	runner.PrintToStdout(false)
	controller := &controllerImpl{
		m:      m,
		runner: runner,
		g:      g,
		env:    env,
	}
	runner.SetEventLogger(controller)
	return controller
}
func (c *controllerImpl) Runner() runner.Runner {
	return c.runner
}
func (c *controllerImpl) RunLocal() int {
	return c.m.Run()
}
func (c *controllerImpl) Log(message string) {
	log.Printf("Runner Event: %s", message)
}
func (c *controllerImpl) SetPrintToStdout(printToStdout bool) {
	c.runner.PrintToStdout(printToStdout)
}
func (c *controllerImpl) runSet(pattern string) (IDs []int, savedToDb bool, stats []constants.Statistics) {
	var err error
	var jobID int
	env, _ := config.ReadFromEnv()
	saveToDatabase := config.RunAs(c.env) == config.RunAsJob && env.DbUrl != ""
	if saveToDatabase {
		jobID, err = c.g.SaveJobStart()
		if err != nil {
			log.Printf("Warning: failed to save results to database: %v", err)
		} else {
			log.Printf("Job ID: %d", jobID)
		}
	}
	c.runner.Match(pattern)
	c.runner.Run()
	stats = c.runner.Statistics()
	c.runner.ClearStatistics()
	if len(stats) > 0 && saveToDatabase {
		var err error
		IDs, err = c.g.Save(jobID, stats)
		if err != nil {
			log.Printf(
				"Warning: failed to save results to database: %v", err)
		} else {
			log.Printf("Test IDs: %v", IDs)
			savedToDb = true
		}
	}
	return
}