36 lines
753 B
Go
36 lines
753 B
Go
package main
|
|
|
|
import (
|
|
"fmt"
|
|
"os"
|
|
"time"
|
|
|
|
fw "git.ruishengces.com/pub_tool/autotest"
|
|
"git.ruishengces.com/pub_tool/autotest/reporter"
|
|
)
|
|
|
|
func main() {
|
|
cfg := fw.ParseFlags("checkin")
|
|
|
|
env := &Env{}
|
|
base, cleanup := fw.ManageEnv(env, fw.EnvConfig{}, cfg)
|
|
defer cleanup()
|
|
|
|
summary := fw.NewRunner("签到模块测试", cfg).
|
|
Report(reporter.Console()).
|
|
Report(reporter.HTML("签到模块测试", "reports", env.Meta())).
|
|
Report(reporter.JSON("reports")).
|
|
Register(
|
|
&CheckinSuite{env: env, url: base.AppBaseURL},
|
|
).
|
|
Build().
|
|
Run()
|
|
|
|
fmt.Printf("\n总计: %d 通过, %d 失败, 耗时 %s\n",
|
|
summary.Stats.Passed, summary.Stats.Failed, summary.Duration.Round(time.Millisecond))
|
|
|
|
if summary.Stats.Failed > 0 {
|
|
os.Exit(1)
|
|
}
|
|
}
|