Hi Community!
I am actually stuck in trying to implement BDD on ODC LOL Had gone thru the resources in the documentations, forums, demo, but still having trouble.
My screen shots should be clear enough. The current step i am struck at, is the 'FinalResult' block, is always showing 'No scenarios executed'. Had do a simple AssertTrue, just to see if something happens. But nothing happens
Client Actions: Only c-Then has logic, the rest of the 4 client actions are empty
BDDFramework Public client actions: There are only 5 available, unlike O11
Any ideas what am i doing wrong, and what am i missing out?
Thank you! Any assistance is greatly appreciated!
To properly implement and execute Behavior-Driven Development (BDD) scenarios in OutSystems Developer Cloud (ODC) while ensuring that the FinalResult block shows the correct results, follow these guidelines:
Define Proper BDD Steps: The steps (Given, When, and Then) must be correctly implemented and linked to actionable logic. Each step should perform self-contained operations with necessary validations and assertions. For instance, use AssertTrue or AssertFail within the logic for testing conditions Problems with failing scenarios.
Given
When
Then
AssertTrue
AssertFail
Ensure FinalResult Placement: The FinalResult block should be placed correctly in the screen’s widget tree. It must be at the same hierarchical level as the scenario blocks and positioned at the end to properly aggregate and display test results. Missing this placement can lead to incomplete or inaccurate result displays FinalResult webblock not always showing correct information.
Reset Data Between Tests: To avoid errors arising from overlapping test data, ensure that the KeyValues_Reset action is triggered before running new scenarios. This can be done either manually by calling it or programmatically within the test setup FinalResult webblock not always showing correct information.
Exception Handling: Integrate exception handlers in client actions used within the Given, When, and Then steps to prevent unexpected scenario behavior. Proper exception handling ensures that failures are correctly categorized by the framework instead of being ignored Unhandled exceptions do not stop scenario's execution.
Scenario Execution Visibility: Verify that the correct logic flow activates test execution. This involves ensuring your scenarios are being invoked and completed during runtime. If no scenarios are executed, confirm that the FinalResult block is correctly placed and the test runner is properly triggered BDD Testing - FinalResult Block shows a wrong number of scenarios that failed.
Debugging Issues in NO SCENARIOS EXECUTED:
By following these practices, you can ensure that your BDD tests in ODC are implemented and executed correctly, and that the FinalResult block reflects the actual state of your test scenarios.
Finally figure out what's happening...in the widget tree, the placement should be like that, instead of what i have previously done. 'FinalResult' block, should be at the bottom, not top
Great that u can solve it.
I am about to create the example, no need anymore