Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

New keyword "Compare Query Results"

未关闭
#251 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
5/5
预计耗时
一周以上
新手友好度
25/100
Issue 类型
功能
描述清晰度
需要澄清
活跃度
停滞
技术栈
python, sql
领域
database, testing

调研方向

该 issue 未指定任何文件、测试或入口点。先定位现有的查询相关关键字及其测试,然后明确行顺序、行数不匹配、输出格式和断言行为。完成的定义是:比较关键字、错误报告以及视觉差异输出对于相等和不相等的结果都有明确的行为。

由索引模型根据 Issue 内容生成。

描述

improvement

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.
主要语言
Python
星标
179
派生
178
PR 合并指标
30 天内没有已合并 PR

环境准备

这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

MarketSquare/Robotframework-Database-Library 的其他 Issue

查看 MarketSquare/Robotframework-Database-Library 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。