Issue
I need to execute some keyword before each and every test cases. Assume I have a .robot file which has 4 test cases, and I need to run a keyword, 4 times before executing those 4 test cases. In TestNG, we can use @BeforeMethod annotation. I would like to know what can be used to do that from Robot Framework?
Thank You.
Solution
Following are the keywords in robot framework as the replacements for execution hooks.
┌────────────────┬───────────────────────┐
│ Robot Keyword │ TestNG Execution Hook │
├────────────────┼───────────────────────┤
│ Test Setup │ @BeforeMethod │
│ Test Teardown │ @AfterMethod │
│ Suite Setup │ @BeforeSuite │
│ Suite Teardown │ @AfterSuite │
└────────────────┴───────────────────────┘
Answered By - Osanda Deshan
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.