has anyone implemented BDD tests involving Roles?

Our dev team is trying to ramp up on BDD tests and it's going pretty well so far.  Our latest feature depends heavily on which OutSystems Role(s) a user has - most of the stories have a role check at the start of the scenario.  I'm wondering if anyone has advice on the best way to implement this.  Our methods all check the logged-in User role, and I'm not sure how to make this testable.  Should we abstract that role check so we can mock it in the methods?  Is it even possible to mock that?  

If anyone has thoughts, experience, best practices or anything else to share I'd love to hear it.  I've been pushing hard for BDD in the org and I'd love to tell security we have test coverage for their concerns as well.



If you can setup users for testing with those roles, then in the given action of your BDD scenario you can use it to login

 Using the User_Login action from the Users module.




That looks like exactly what I need, thanks!  

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.