devmadhuu commented on PR #6983:
URL: https://github.com/apache/ozone/pull/6983#issuecomment-2255729565

   > Hi @devmadhuu, thanks a lot for asking:
   > 
   > * Yes, thanks for your inputs, we should have the tests validate negative 
test scenarios as well like failure of API call, missing data etc.
   > * So regarding the layout, colour, feel etc. this would not be handled by 
Unit tests. While this is certainly possible via unit tests, it is not 
recommended. Mostly because:
   >   
   >   * The tests are run in a virtual DOM, and it is usually bad practice to 
make such test scenarios as virtual DOM is not visible to the user, it is an 
emulated DOM.
   >   * Other libraries like Cypress are better equipped for things like this 
as it has a usable browser where we can check what is being executed (it will 
show where the click happened, what is the current step being executed etc.) 
and it is a better job for E2E tests
      --- As long as we have it in plan, its good, whatever library is suitable 
for it. But this should be prioritised as in real time, we have faced this in 
past.
   > * This would not be able to detect build issues, as this directly runs on 
the code and validates kind of similar to how Java Unit tests don't require the 
build step to happen, but directly validate the code - so build errors are not 
detected in this scenario. For this I would still recommend contributors to 
build the project after making UI changes both for build failure detection and 
also for testing it out via actual cluster operations
   > * So static lock-file needs to be pushed, as building it dynamically via 
CI is not quite optimized. Basically what the lockfile contains is metadata 
regarding the packages and generating it from scratch takes some time. Since we 
run `pnpm install --frozen-lockfile` this skips the fetching of package data 
from npm, re-creating the lockfile and then installing and directly goes to the 
installation phase which saves us quite some time in the install phase. This is 
also recommended for other package managers like npm and yarn in order to save 
build time.
   > * I think this might be possible, but it is not as intuitive as say for 
Python or Java where we can specify test group and markers to run specific set 
of tests.
     --- IMO, smoke tests should be given priority because this also we have 
faced in past that due to introduction of some flag, something got broken and 
it has nothing do with backend.
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to