MarketSquare / MarketSquare/Robotframework-Database-Library

New keyword "Compare Query Results"

オープン
#251 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

improvement
主要言語
Python
スター
179
フォーク
178
PR マージ指標
30日以内にマージされた PR はありません

説明

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.

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

この issue では、ファイル、テスト、エントリーポイントが指定されていません。まず既存のクエリ関連キーワードとそのテストを見つけ、次に行の順序、行数の不一致、出力形式、アサーションの動作を明確にします。完了条件は、等しい結果と等しくない結果の両方について、比較キーワード、エラー報告、視覚的な差分出力の動作が定義されていることです。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
python, sql
領域
database, testing
issue の種類
機能追加
難易度
5/5
見積もり時間
1週間以上
活発さ
停滞
明瞭さ
説明が足りない
初心者へのやさしさ
25/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。