I want to convert our integration pytests over to bazel, but it doesn't seem to actually run nor produce the junitxml output I'm expecting:
ARGS = [
"--verbose",
"--json-report",
"--junit-xml=junit.xml",
]
py_test(
name = "test_something",
srcs = ["test_something.py"],
args = ARGS,
tags = [
"yourit",
],
deps = [
requirement("pytest"),
requirement("pytest-json-report"),
":lib",
],
)
There is a similar question here: How do I use pytest with bazel?. But it didn't cover the multitude of issues I ran into.