feat: run xctest before start ios automation

This commit is contained in:
debugtalk
2022-12-01 22:34:34 +08:00
parent 78349c717b
commit 77acfd2f03
4 changed files with 59 additions and 10 deletions

View File

@@ -15,7 +15,7 @@ import (
var rootCmd = &cobra.Command{
Use: "wcl",
Short: "Monitor FIFA World Cup Live",
Version: "2022.11.30.2341",
Version: "2022.12.01.2236",
PreRun: func(cmd *cobra.Command, args []string) {
log.Logger = zerolog.New(
zerolog.ConsoleWriter{NoColor: false, Out: os.Stderr},

View File

@@ -65,6 +65,7 @@ func initIOSDevice(uuid string) uixt.Device {
uixt.WithWDAPort(8700), uixt.WithWDAMjpegPort(8800),
uixt.WithResetHomeOnStartup(false), // not reset home on startup
uixt.WithPerfOptions(perfOptions...),
uixt.WithXCTest("com.gtf.wda.runner.xctrunner"),
)
if err != nil {
log.Fatal().Err(err).Msg("failed to init ios device")

View File

@@ -29,6 +29,7 @@ func TestConvertTimeToSeconds(t *testing.T) {
}
func TestMainIOS(t *testing.T) {
uuid := "00008030-00194DA421C1802E"
device := initIOSDevice(uuid)
bundleID := "com.ss.iphone.ugc.Aweme"
wc := NewWorldCupLive(device, "", bundleID, 30, 10)