tst_TreatmentScreen

Clone Tools
  • last updated a few seconds ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates
Bamboo Commit: Updated the Copyright section and replaced tabs with 4 spaces

  1. … 65 more files in changeset.
Bamboo Commit: Updated the Copyright section and replaced tabs with 4 spaces

  1. … 65 more files in changeset.
Still don't feel comfortable with this solution and haven't been convinced that it should be the way to get around the SquishQt issue of finding the object within the given timeout. On the other ha...

Still don't feel comfortable with this solution and haven't been convinced that it should be the way to get around the SquishQt issue of finding the object within the given timeout.
On the other hand, don't have a better idea to stop the test from failing randomly.
So would be better to keep it for now.

RESOLVED

RESOLVED

Please change to TreatmentStates RESOLVED

Please change to TreatmentStates
RESOLVED

Nothing has changed about the usage of the SquishQt API, other than the fact that the dictionary passed to waitForObjectExists previously wasn't really testing anything. Removing utils.dict_update ...

Nothing has changed about the usage of the SquishQt API, other than the fact that the dictionary passed to waitForObjectExists previously wasn't really testing anything.
Removing utils.dict_update it will break the test case.

I will discuss with Peman and get back to you.

I will discuss with Peman and get back to you.

I believe we discussed enough. And it was discussed verbally before to not to do it. Nothing has changed about the usage of the SquishQt API. We pass a dictionary to waitForObjectExists prior to ...

I believe we discussed enough.
And it was discussed verbally before to not to do it.


Nothing has changed about the usage of the SquishQt API. We pass a dictionary to waitForObjectExists prior to this change and after.
Removing it will break the test case.

If nothing has changed so why your test would break.
Please change it to the recommended ways in SquishQt examples.

The way it was used is in SquishQt examples, but I can't find any example that SquishQt is being used the way you used it. Please change it to the recommended ways in SquishQt examples.

The way it was used is in SquishQt examples, but I can't find any example that SquishQt is being used the way you used it.
Please change it to the recommended ways in SquishQt examples.

I think you've misunderstood. The bug is not part of the SquishQt API. It is a problem with the way the SquishQt API is being used.

I think you've misunderstood. The bug is not part of the SquishQt API. It is a problem with the way the SquishQt API is being used.

If there is a bug in SquishQt please report to Froglogic and give feedback and please don't try to fix it by yourself. In case they fix the bug (if there is a bug) and they fix it, and the fix is n...

If there is a bug in SquishQt please report to Froglogic and give feedback and please don't try to fix it by yourself.
In case they fix the bug (if there is a bug) and they fix it, and the fix is not compatible with your fix, then we have self-generated bugs.
Please remove these and let Froglogic know you found a bug and let them help us.

RESOLVED

RESOLVED

We are in agreement that each test should be self contained. To ensure each test is self-contained, each test needs to have a separate instance of HDSimulator. The design of dialin is not the focus...

We are in agreement that each test should be self contained.
To ensure each test is self-contained, each test needs to have a separate instance of HDSimulator.
The design of dialin is not the focus of this review...

Tx_States violates the CapWords convention for classes as per our coding standard, as no underscores should be present between words in a class name. TreatmentStates is clearer than TxStates. Tx co...

Tx_States violates the CapWords convention for classes as per our coding standard, as no underscores should be present between words in a class name.
TreatmentStates is clearer than TxStates. Tx could easily be confused with transmit...

I agree. To ensure I don't miss additional instances of HDSimulator I'll make this change on the latest testsuites branch I'm working on.

I agree. To ensure I don't miss additional instances of HDSimulator I'll make this change on the latest testsuites branch I'm working on.

I don't mean to limit the HDSimulator to static functions, it can have static and normal methods. 1 - The test scripts are run in a consecutive manner, not in parallel. Each test should be self c...

I don't mean to limit the HDSimulator to static functions, it can have static and normal methods.


1 - The test scripts are run in a consecutive manner, not in parallel. Each test should be self contained.

I agree in this case but the general implementation and design of HDSimulator lead to that misuse of the class.

Please consider changing the instance name to hd_simulator. The name of variables is always important, especially in this case which makes it confusing since the name of the class and the variable ...

Please consider changing the instance name to hd_simulator.
The name of variables is always important, especially in this case which makes it confusing since the name of the class and the variable are the same.

It has been defined as a class not a variable after the name change. So the name should be "Tx_States"

It has been defined as a class not a variable after the name change.
So the name should be "Tx_States"

RESOLVED

RESOLVED

Limiting the HDSimulator to static functions prevents you from maintaining any state between successive calls and is incompatible with the DenaliCanMessenger. It is an improvement to hold state inf...

Limiting the HDSimulator to static functions prevents you from maintaining any state between successive calls and is incompatible with the DenaliCanMessenger. It is an improvement to hold state information and allows us to use the DenaliCanMessenger. Using the DenaliCanMessenger and dialin eliminates the need to maintain duplicated codebases and allows for bidirectional messaging. Your squish folder was doing the same thing as dialin but on a smaller scale.

1 - The test scripts are run in a consecutive manner, not in parallel. Each test should be self contained.
2 - (See statement above). This comment is about dialin, not testsuites.
3 - (See statement above). This comment is about dialin, not testsuites.

Also since the variable name stylings are not considered major issues, I will take a note and make sure to update the variable name at a later time.

Also since the variable name stylings are not considered major issues, I will take a note and make sure to update the variable name at a later time.

1 - Since the name of the variable is not a major issue, I have noted your comment and will update the name to hd_simulator in a future revision. 2 - It does, it was added in a future revision. Ple...

1 - Since the name of the variable is not a major issue, I have noted your comment and will update the name to hd_simulator in a future revision.
2 - It does, it was added in a future revision. Please keep in mind this code review is 8 weeks old.

I changed it from tx to TX to make it clearer it was a constant, but to maximize readability I think it should be TREATMENT_STATES, or TX_STATES to align with our coding standard, not TxStates. Fr...

I changed it from tx to TX to make it clearer it was a constant, but to maximize readability I think it should be TREATMENT_STATES, or TX_STATES to align with our coding standard, not TxStates.

From our coding standard:


Constants are usually defined on a module level and written in all capital letters with
underscores separating words. Examples include MAX_OVERFLOW and TOTAL

At the time, this must have been the latest commit on the dialin master branch. It isn't maintained manually. It's generated automatically when issuing the pip freeze > requirements.txt command.

At the time, this must have been the latest commit on the dialin master branch.
It isn't maintained manually. It's generated automatically when issuing the pip freeze > requirements.txt command.

Please use the SquishQt recommended syntax and functions as has been explained and described in their examples. In this change I am actually correcting a misuse of the squishqt api. waitForObjectE...


Please use the SquishQt recommended syntax and functions as has been explained and described in their examples.

In this change I am actually correcting a misuse of the squishqt api. waitForObjectExists will always return true after the first call without using utils.dict_update. This is because the text is omitted from the object that is being waited for. So, the object holding the text will always exist, and each successive call will not wait for the text to be updated. To pass, you were basically relying on the long delay added by cansend that occurs between each call to test_values. That delay happened to be longer than it takes for the text to be updated in the UI, allowing the tests to pass by accident. This kind of test design is fragile, as the test could fail at any time depending on how long cansend takes to send a message.


I would rather let SquishQt test and check the existence of the properties (in this case ".text") instead of another function adding a property to the dictionary without making sure that the object actually has the property and not checking the object tree.

(See above)

what is this commit and why it has been mentioned here? how is this going to be maintained?

what is this commit and why it has been mentioned here?
how is this going to be maintained?

If the name needs to change, regarding our coding standard and also to medical industry standards, it should be: "TxStates" with 'x', not capital. TX has other meanings in other areas.

If the name needs to change, regarding our coding standard and also to medical industry standards, it should be:
"TxStates" with 'x', not capital.
TX has other meanings in other areas.

How come this module doesn't have "HDSimulator = HDSimulator()" and still is using an instance of the HDSimulator? it shows that : 1 - The name of the object has to be different than the class name...

How come this module doesn't have "HDSimulator = HDSimulator()" and still is using an instance of the HDSimulator?
it shows that :
1 - The name of the object has to be different than the class name itself so we will understand which one is used. (class or instance)
2 - If this one doesn't require defining the HDSimulator, then why it has been defined in the other ones.