You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
"""Override report_context to disable log file simulation for integration tests in this directory so that we can exercise the context manager when no log file is provided."""
"""Replay a log file by parsing each entry, simulating the results, then creating for real.
2006
2006
2007
2007
This method reads a log file created by the simulation logging, reconstructs
2008
2008
all the objects via simulation, and then creates them via the actual API.
2009
2009
IDs are mapped from simulated to real during the creation process.
2010
2010
2011
2011
Args:
2012
-
log_file: Path to the log file to replay.
2012
+
log_file: Path to the log file to import.
2013
+
incremental: (internal tooling) If True, goes line by line and calls every event vs. reading the entire file at once and sending resultant test report.
2013
2014
2014
2015
Returns:
2015
2016
A ReplayResult containing the created report, steps, and measurements.
"""Replay a log file by parsing each entry, simulating the results, then creating for real.
624
625
@@ -627,12 +628,13 @@ async def import_log_file(
627
628
IDs are mapped from simulated to real during the creation process.
628
629
629
630
Args:
630
-
log_file: Path to the log file to replay.
631
+
log_file: Path to the log file to import.
632
+
incremental: (internal tooling) If True, goes line by line and calls every event vs. reading the entire file at once and sending resultant test report.
631
633
632
634
Returns:
633
635
A ReplayResult containing the created report, steps, and measurements.
Copy file name to clipboardExpand all lines: python/lib/sift_client/util/test_results/__init__.py
+8-3Lines changed: 8 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -58,7 +58,12 @@ def main(self):
58
58
- If you want each module(file) to be marked as a step w/ each test as a substep, import the `module_substep` fixture as well.
59
59
- The `report_context` fixture requires a fixture `sift_client` returning an `SiftClient` instance to be passed in.
60
60
61
-
Note: FedRAMP users: report_context will log test results to a temp file to avoid API calls during test execution. If this is a shared environment, you should import the `report_context_no_logging` fixture instead.
61
+
Note: FedRAMP users: report_context will log test results to a temp file to avoid API calls during test execution. If this is a shared environment, you can disable logging by passing ``--sift-test-results-log-file=false``.
62
+
63
+
#### Configuration
64
+
65
+
- Git metadata: You can configure the test results by passing the `--sift-test-results-git-metadata` flag to pytest in your commandline, conftest.py file, or as an addopt in your pyproject.toml file (https://docs.pytest.org/en/stable/reference/customize.html#configuration).
66
+
- Log file: You can configure the log file by passing the `--sift-test-results-log-file` flag to pytest in your commandline, conftest.py file, or as an addopt in your pyproject.toml file.
62
67
63
68
###### Example at top of your test file or in your conftest.py file:
# To avoid GRPC forking errors, temporarily redirect stderr at the fd level before forking, so the child inherits /dev/null on fd 2 when the atfork handler fires.
0 commit comments