03 08 2023 Meeting - vanderbilt-redcap/redcap_cypress GitHub Wiki

Meeting Minutes

Updates to RCTF v11.1.5 status

Screen Shot 2023-03-08 at 9 32 16 AM

Screen Shot 2023-03-08 at 9 32 52 AM

  • We are back to 100% pass rate on RCTF steps on v11.1.5 - https://cloud.cypress.io/projects/pvu79o/runs/776/specs
  • This includes 435 steps at the moment.
  • Tests ran in a total of 2 minutes and 50 seconds.
  • Now I can more easily merge across features that are waiting to be reviewed.

CSRF strategy

Element Detachment

Workflow Notes

  • Writing Tests to Prevent Detachment
  • I probably have skipped over some testing 101, so here's a crash course on how to write tests ...

Software Testing 101

  • PATTERN - The overall pattern we should be following is this:
  • action
  • assertion
  • action
  • assertion
  • DETACHMENT - Detachment basically is something that happens when we try doing this kind of thing:
  • action
  • action
  • action
  • Actions should have consequences so we should not expect the screen would look the same.

IMPORTANT NOTE: I'm also not implying that my tests or step definitions are perfect in sticking to this pattern, this is just a remind to everyone as they work through writing the Gherkin AND step definitions that if we aren't following that pattern, we can get sucked into detachment situations pretty easily.

Tagging

How is tagging going on your current feature commits? Preferred commit style with tags. Example: aldefouw#75. (aldefouw#Issue ID)

Brittle Step Removal

Began removing some of the step definitions that were brittle. Removed PID dependencies on the current features.

Next Steps

I am going to continue with my review of features in the "In Review" column. That means the next feature I'll look over is the "Add / Manage Users" feature. And then "Data Entry through Data Collection Instrument" and so on.

As a reminder, if you have any steps that are selecting elements by ID, like this: https://github.com/aldefouw/redcap_cypress/blob/c513864ebc603259107761d9546d27dfffb45003/cypress/features/core/pre-requisite/assign_super_users.feature#L113-L114

  • Those need to be converted to an existing step definition or a special step definition for that specific feature needs to be created.
  • In this case, what these steps were doing was checking a box to assign Administrator Privileges to an admin in the system. So what I did was create a step definition that allowed me to either enable or disable the checkbox for those:

https://github.com/aldefouw/redcap_cypress/blob/v11.1.5/cypress/features/core/pre-requisite/assign_super_users.feature#L107-L108

  • Something I want you to note is that the reason this step definition is robust is because it follows the prescriptive pattern that I showed you:

https://github.com/aldefouw/redcap_cypress/blob/v11.1.5/cypress/support/step_definitions/control_center.js#L30-L74

NON-TECHNICAL REVIEWER?

https://github.com/aldefouw/redcap_cypress/projects/4

I am a TECHNICAL REVIEWER. I do my best to look at the v11.1.5 Test Script and make sure it is adhering to the test script, but because I am constantly dealing with step definitions and framework level stuff, I only have time to scan the Test Scripts.

It would be nice if someone could review the feature tests for readability and correctness against the actual manual Test Scripts. My concern isn't about whether the GIVEN, WHEN, THEN, etc statements are making sense. My concern is whether the steps are passing. There also could be gaps in terms of what we're asserting.

So, for example, is someone willing to read through the "Completed" features and check that the scenarios and steps have the proper keywords AND they read well? I wanted to eliminate all of the esoteric selector statements as well. There's a lot going on and I'm human so I have this feeling I might have missed something.

Meeting Frequency

WORKING MEETINGS

I said that I would put some weekly 9am CST working meetings starting the week of March 15. That is now in place.

Status Updates

  • No significant updates. We'll know more after the working meetings next week.