arcus-azure / arcus-azure/arcus.testing

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

Open
#398 0 comments 0 reactions 0 assignees View on GitHub
area:assert enhancement good first issue
Dominant language
C#
Stars
9
Forks
6
PR merge metrics
No merged PRs in 30d

Description

### 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.

```text
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.

Contributor guide

Open the contributing guide

Research direction

Start with CsvTable.GetOriginalRowAtOrAll, which the issue identifies as the change point, and locate the existing tests that verify differing CSV cell values. Run those tests before changing the expected and actual row output. Done means both rows show an ASCII ↑ aligned with the differing cell and the updated tests pass.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
testing
Issue type
Feature
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.