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.

貢獻者指南