arcus-azure/arcus.testing

💪 [Enhance]: `AssertCsv` failure message with arrow ↑ that points to the different cell value

开放

#398 创建于 2025年5月12日

 (0 条评论) (0 个反应) (0 位负责人)C# (6 个派生)auto 404
area:assertenhancementgood first issue

仓库指标

星标
 (9 个星标)
PR 合并指标
 (PR 指标待抓取)

描述

Description

When working with large CSV rows, that have similar values, it could not always be easy to locate the actual difference between expected/actual. The current failure message already shows the different cell value, row number and the entire inputted expected/actual row, but does not visually show where in the row the difference is located (beside the column number).

Solution

A visually attractive solution that would make the failure message even more useful and for testers to more quickly spot the difference, we could add a ASCII ↑ character that points to the different cell value. This should be added in both the expected as well as the actual outputted CSV row.

Expected:
col_1;col_2;col_3
thing;horse;chair
      ↑

Actual:
col_1;col_2;col_3
thing;table;chair
      ↑

Additional context

The change should happen in the CsvTable.GetOriginalRowAtOrAll. We should alter some of the tests that deal with verifying different cell values that the arrow is indeed placed at the right spot.

贡献者指南