Test Complete BDD
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Test Complete BDD
I am trying to write BDD scenario and trying to integrate it with a script that I had already created.
The script starts with
from Locators import Locators
from TestData import TestData
and then has the following statement
def FindID():
I am trying to integrate this as a step definition with "Given" statement. It is giving error "Unexpected Identifier".
Please help me. I am new to test complete and learning.
- Labels:
-
BDD Tests
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
A good starting point would be to read through Behavior-Driven Development (BDD) With TestComplete.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thankyou for your reply. I did go through that. It has simple examples and I followed the example for python (the 'def' statement inside the 'Given' step definition). I am getting error. Here is the code:
Given("the user is logged in to the XXX application", function (){
from Locators import Locators
def FindInv_1():
...
...
..
});
Can you please help me? How do I fix this?
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The coding you have provided looks like it's for JavaScript and not Python. Python coding will look something like this,
@given("My app has started")
def step_impl():
# ...
The BDD Tests topic has example codes for Python as well.
