Skip to content

feat: Format test results as JSON #574

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -996,13 +996,15 @@ The commands work as following:
log.WithFields(log.Fields{"error": err}).Info("Failed running Xcuitest")
}

log.Info(fmt.Printf("%+v", testResults))
fmt.Println(convertToJSONString(testResults))
} else {
config.Listener = testmanagerd.NewTestListener(io.Discard, io.Discard, os.TempDir())
_, err := testmanagerd.RunTestWithConfig(context.TODO(), config)
testResults, err := testmanagerd.RunTestWithConfig(context.TODO(), config)
if err != nil {
log.WithFields(log.Fields{"error": err}).Info("Failed running Xcuitest")
}

fmt.Println(convertToJSONString(testResults))
}
return
}
Expand All @@ -1028,13 +1030,15 @@ The commands work as following:
log.WithFields(log.Fields{"error": err}).Info("Failed running Xctest")
}

log.Info(fmt.Printf("%+v", testResults))
fmt.Println(convertToJSONString(testResults))
} else {
var listener = testmanagerd.NewTestListener(io.Discard, io.Discard, os.TempDir())
_, err := testmanagerd.StartXCTestWithConfig(context.TODO(), xctestrunFilePath, device, listener)
testResults, err := testmanagerd.StartXCTestWithConfig(context.TODO(), xctestrunFilePath, device, listener)
if err != nil {
log.WithFields(log.Fields{"error": err}).Info("Failed running Xctest")
}

fmt.Println(convertToJSONString(testResults))
}
return
}
Expand Down