Skip to content

Commit

Permalink
address review comments; some minor fixes; add newsfrag
Browse files Browse the repository at this point in the history
  • Loading branch information
zhenyu-ms committed Jan 20, 2025
1 parent d0ba6ff commit 5ba34e5
Show file tree
Hide file tree
Showing 12 changed files with 2,507 additions and 1,711 deletions.
9 changes: 9 additions & 0 deletions doc/newsfragments/2900_changed.streamline_json_report.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
Change Testplan exported JSON report structure to reduce report size.

* Remove unused report entry fields.
* ``fix_spec_path`` and ``host``.
* ``status_override`` and ``status_reason`` in case they are empty.
* ``line_no``, ``code_context`` and ``file_path`` if ``--code`` is not enabled.
* ``env_status``, ``part`` and ``strict_order`` depending on report category.
* Remove unused assertion entry fields ``category`` and ``flag`` if they are ``DEFAULT``.
* Merge assertion entry field ``utc_time`` and ``machine_time`` into unix-format ``timestamp``, and store timezone info in parent Test-level report under key ``timezone``.
2 changes: 1 addition & 1 deletion testplan/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

__version__ = "24.9.2"

dev_build = int(os.environ.get("DEV_BUILD", "1"))
dev_build = int(os.environ.get("DEV_BUILD", "0"))
dev_suffix = f"dev{int(time.time())}" if dev_build else ""

__build_version__ = f"{__version__}{dev_suffix}"
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ function defaultProps() {
columns: ["age", "name"],
indices: [0, 1, 2],
table: [
{ age: 32, name: "Bob" },
{ age: 24, name: "Susan" },
{ age: 67, name: "Rick" },
[32, "Bob"],
[24, "Susan"],
[67, "Rick"],
],
type: "TableLog",
utc_time: "2019-02-12T17:41:43.241777+00:00",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -226,9 +226,8 @@ export function prepareTableLogRowData(indexes, table, columns, display_index) {

indexes.forEach((index) => {
let row = columns.reduce((accumulator, column, idx) => {
if (Array.isArray(table[index])) accumulator[column] = table[index][idx];
// TODO: remove this branch after 3 months 2021.06.01
else accumulator[column] = table[index][column];
// Array.isArray(table[index])
accumulator[column] = table[index][idx];
return accumulator;
}, {});
if (display_index) row["id"] = index;
Expand Down
Loading

0 comments on commit 5ba34e5

Please sign in to comment.