v11/Remove Fake Query -> Query::TestCaseStartedByTestCase#1854
v11/Remove Fake Query -> Query::TestCaseStartedByTestCase#1854luke-hill wants to merge 6 commits intov11/remove_fake_queryfrom
Query::TestCaseStartedByTestCase#1854Conversation
|
|
||
| # Query missing | ||
| # find_test_case_started_by_test_case_id | ||
| attempts_made_new = |
There was a problem hiding this comment.
@mpkorstanje Need your thoughts here.
I'm looking to find out what attempt I am on. The way I do this is to do the following.....
- Find all
test_case_startedmessages - Filter and only obtain the messages where the
test_case_idequals the current event test case id (Current event ids are congruent to the message ids), then return the attempt - For this array of attempts, return the largest value
This in theory could be a query method. But I am querying using an id, not a message object. Furthermore, because this event is triggered and I want to find out information on itself, it can be nil.
The results I obtain are again shifted out by a value of 1. i.e. my new methodology returns me 0/1/2 whereas the message returns me 1/2/3
Questions)
- Should this be a query method. If so how do we construct it - because in some situations I won't have a message (I suppose in the situations I have no message, I can assume attempt is 1?)
- Should I be aiming to scan using a message, if so what message should I be using?
Query::TestCaseStartedByTestCase
| @@ -376,7 +382,8 @@ def on_undefined_parameter_type(event) | |||
| end | |||
|
|
|||
| def test_case_started_id(test_case) | |||
There was a problem hiding this comment.
This is used in over 10 locations.
It "might" be that each of those locations can use a better implementation instead of going around the houses. But for now this works
luke-hill
left a comment
There was a problem hiding this comment.
This is overwriting the test cases so I only have 1 test case for n iterations of a test
Description
This is a WIP to begin to isolate out the fake query
Query::TestCaseStartedByTestCaseType of change
Please delete options that are not relevant.
Please add an entry to the relevant section of CHANGELOG.md as part of this pull request.
Checklist:
Your PR is ready for review once the following checklist is
complete. You can also add some checks if you want to.
bundle exec rubocopreports no offenses