MarketSquare / MarketSquare/Robotframework-Database-Library
New keyword "Compare Query Results"
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- Python
- Sterne
- 179
- Forks
- 178
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beschreibung
The keyword should compare results of two SQL queries and show the difference.
The arguments would be like ``query_1``, ``query_2`` and ``assert_results_equal`` (_True_ or _False_).
If _False_, there is no assertion - just show print the difference in the RF log.
Both queries must deliver the same columns - same numbers and the same names.
It has to be implemented in the queries themselves.
## The output should look like a merged table
- The columns are the same, they're merged (no duplicated cols like _Col_A_Query_1_ and _Col_A_Query_2_ - just _Col_A_).
- The cells with not equal values should get a red background and contain both values like ``Value 1 != Value 2``.
- The column name and the row number with a cell with unequal values shall be highlighted as well.
- And maybe keep them visible during the scrolling (sticky scroll)?
- All other cells with equal values should be either not highlighted at all or get a green background maybe.
## Apart from the visual highlighting, there should be an assertion to provide the keyword status and the error message
- The error message should not include all details, but maybe a number of rows and column names? Like this: _X rows had differences in cols A, B and C_?
## The very first check though should be the comparison of row number in results
- If they are unequal, there should be an error message (without details) - and an additional visual output.
- Visually, it would be maybe nice to print both tables aside and highlight rows, which exist in one of the results only - in green and red, like git merge style?
- No further assertions are performed in this case.
Beitragsleitfaden
Für dieses Repository ist kein Beitragsleitfaden indexiert
Erste Schritte
- Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
- Forke das Repository und arbeite in einem Branch.
- Öffne einen Pull Request, der die Issue-Nummer nennt.
Rechercherichtung
Das Issue nennt keine Dateien, Tests oder Einstiegspunkte. Beginne damit, die vorhandenen abfragebezogenen Schlüsselwörter und ihre Tests zu lokalisieren, und kläre anschließend die Reihenfolge der Zeilen, Abweichungen bei der Zeilenanzahl, die Ausgabeformatierung und das Verhalten von Assertions. Als erledigt gilt die Aufgabe, wenn für gleiche und ungleiche Ergebnisse das Vergleichsschlüsselwort, die Fehlerberichterstattung und die visuelle Ausgabe der Unterschiede ein definiertes Verhalten haben.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- python, sql
- Bereich
- database, testing
- Issue-Typ
- Feature
- Schwierigkeit
- 5/5
- Geschätzter Aufwand
- Über eine Woche
- Aktivitätsstatus
- Veraltet
- Klarheit
- Muss geklärt werden
- Anfängerfreundlichkeit
- 25/100