Set Scan Wait Rate doesnt set scan rate properly.
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 45/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 停滞
- 技術スタック
- java
- 領域
- testing-qa
調査の方向性
まず、ScreenKeywords.java がどのように Region を作成し、SettingsKeywords.java がどのように Settings.WaitScanRate を変更するかを追跡し、次に SikuliApi における Region の初期化を調べます。既存のリージョンが後から行われるスキャンレートの変更をどのように受け取るべきかを判断します。完了条件は、Set wait scan rate キーワードが screen keywords で使用されるリージョンを制御し、適切な動作が関連するテストで検証されていることです。
索引モデルが issue の本文から書いたものです。
説明
Hey there, thankyou for this library, so far its great!
When playing with the Set Scan Rate key word, I noticed that the set scan rate doesn't seem to apply properly.
I dont have an IDE available, nor do I have a example script to demonstrate this at the moment otherwise I would do a pull request or give the script to demonstate... But the problem is due to the following:
@RobotKeywords
public class ScreenKeywords {
private static double DEFAULT_TIMEOUT = 3.0;
private static Screen screen = new Screen();
private static Region region = new Region(screen);
Note in ScreenKeywords.java, the region is created
and in SettingsKeywords.java
This is good, but this is an issue with how the Region class is then initialised in SikuliApi, which at its initialisation, it only ever calls Settings.WaitScanRate once.
public class Region extends Element {
...
/**
* set the regions individual WaitScanRate
*
* @param waitScanRate decimal number
*/
public void setWaitScanRate(float waitScanRate) {
this.waitScanRate = waitScanRate;
}
private float waitScanRateDefault = Settings.WaitScanRate;
private float waitScanRate = waitScanRateDefault;
So the following logic, doesn't quite control the scan rate for the region defined in the region key words.
@RobotKeyword("Set wait scan rate" + "\n Specify the number of times actual search operations are performed per second while waiting for a pattern to appear or vanish.")
@ArgumentNames({"delay"})
public void setWaitScanRate(float scanRate) {
Settings.WaitScanRate = scanRate;
}
So this is where it gets a little tricky because the two classes containing the key words don't effectively work with one-another.
Could always do the lazy option and move the Set wait scan rate into ScreenKeywords.java and then do a
region.setWaitScanRate(float scanRate) instead (I wont complain, this will solve my issue ;) )
or.. if you are looking for a cleaner/ more elegant solution..
Create a settings class service, with an inbuilt observer pattern to notify settings changes made from SettingsKeywords.java to ScreenKeywords.java.
I would normally suggest DI, but being that I'm not super experienced with robot keywords yet and how that impacts keyword registration, A Singleton pattern may be better suited here even though its more of a anti-pattern.
- 主要言語
- Java
- スター
- 163
- フォーク
- 60
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
MarketSquare/robotframework-SikuliLibrary のほかの issue
-
enhancement
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
MarketSquare/robotframework-SikuliLibrary#205 · コメント 1 件 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 45/100
-
難易度 3/5 1〜2日 初心者へのやさしさ 35/100
MarketSquare/robotframework-SikuliLibrary#201 · コメント 2 件 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 25/100
MarketSquare/robotframework-SikuliLibrary#188 · コメント 1 件 ·
-
難易度 5/5 1週間以上 初心者へのやさしさ 15/100
MarketSquare/robotframework-SikuliLibrary の issue をすべて見る
似ている issue
-
enhancement feature
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
rsp777/service-pulse-app#28 ·
-
human-required sync-failed
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
Azure/osdu-spi-file#63 ·
メンテナーはふだん 1 日以内に返信
-
area/ysql kind/enhancement priority/medium status/awaiting-triage
難易度 2/5 1〜3時間 初心者へのやさしさ 73/100
yugabyte/yugabyte-db#35578 ·
メンテナーはふだん 1 日以内に返信
-
frontend quick win
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
CodeForPhilly/benefit-decision-toolkit#571 ·
メンテナーはふだん 1 日以内に返信
-
approved
難易度 2/5 1〜3時間 初心者へのやさしさ 67/100
checkstyle/checkstyle#22129 ·
メンテナーはふだん 1 日以内に返信