-
Notifications
You must be signed in to change notification settings - Fork 247
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added new ID tests and README file for verify_test_type #1555
Conversation
Did you run tests individually to confirm them? Can you check how https://github.com/TestingResearchIllinois/idoft/tree/main/verify_test_type can help you confirm the type? |
I ran the |
Okay, great. Now try that |
You can run the checker locally before pushing some changes. You need not repeatedly find these failures on the CI. |
Yes now i will do it locally only thanks. |
The checker passes now, thanks. What does |
I ran the verify_test_type command individually for all the tests. Below are the logs for each set of tests:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please address the comment on README
|
||
Go to the root directory of the repository which has the newly found flaky test. | ||
|
||
#### 2. Download the script in your repository |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not just git clone ...idoft
, especially if you're already changing pr-data.csv
or other files in the repo?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We only need the script file and not the entire repository so its better to just add the verify_test script to the repo.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But installing wget
ends up more challenging than just git clone
. Also, why include here instructions for downloading wget
when people can download that file/script in any other way they want.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will remove the wget and chmod commands, and instead mentioning that users can download that file/script in any way they want.
verify_test_type/README.md
Outdated
Run the script for a particular test using this command: | ||
|
||
``` | ||
./verify_test_type.sh <module-name> <commit-hashcode> <test-name> <class-name> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add some example invocation?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added an example of invocation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please see more reviews on the README now that I read it in detail.
verify_test_type/README.md
Outdated
@@ -0,0 +1,43 @@ | |||
<h1 align="center">Verify Test Type</h1> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why use HTML tags in a Markdown?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since this was used for certain scripts in idoft for example in https://github.com/TestingResearchIllinois/idoft/blob/main/format_checker/README.md. Tried to make README consistent.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Change those README
s (likely in a different PR).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So should i remove the html tags or not from the markdown in this README file?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, remove (rather replace with #
and such) in this file in this PR. Then open another PR to remove from the other README files.
verify_test_type/README.md
Outdated
@@ -0,0 +1,43 @@ | |||
<h1 align="center">Verify Test Type</h1> | |||
|
|||
<p align="center">Script Purpose: Ensure the identification of the test type (e.g., ID, OD, NOD, etc.) for new tests discovered in a repository. </p> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does Markdown support centering text?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes
|
||
Go to the root directory of the repository which has the newly found flaky test. | ||
|
||
#### 2. Download the script in your repository |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But installing wget
ends up more challenging than just git clone
. Also, why include here instructions for downloading wget
when people can download that file/script in any other way they want.
verify_test_type/README.md
Outdated
|
||
#### 3. Make the script executable | ||
|
||
Use this command to make the script executable: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wouldn't need this for git clone
(in fact, shouldn't need it if the file has the right permission in the repo, and if the file doesn't have, just open a PR for that).
|
||
Example of an invocation: | ||
``` | ||
./verify_test_type.sh bundles/org.openhab.core.thing 660102e3f93f928473b66f56f2955090dfa3c30e testCreateChannelDescriptionChangedEventOnlyNewValue ThingEventFactoryTest |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since you're provided repo and commit SHA here, what ensures that the exact commit is checked? Does the script clone the repo? Or does it assume that you've already cloned it? If the latter, does it check that the commit SHA matches git rev-parse HEAD
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The repository is forcefully reset to the exact commit SHA specified by $commit_hash. This guarantees that all operations performed by the script will use this specific state of the repository. It assumes the repository is already cloned.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good description. Please add it in README
(on in the script), because the users won't be reading this PR discussion.
I have updated the README with the description of script and have removed the HTML tags from it |
Okay, let's declare victory for this PR, so you can review #1554 |
The tests are ID tests detected by NonDex.
Java Version - 17.0.13
Maven Version - 3.9.6
Ran the nondex command and the test command without nondex on the repository to find the new flaky tests.
The logs for the tests can be found at
/home/yvajani2/openhab-core/openhab.txt
Have also added a README.md file which states the steps to run the verify_test_type.sh script locally.