Vikram,
The best way to understand the implementation details is to read the
step definition. For example, the scenario step
When customer Bob uploads a new document "War_and_Peace"
might map to a step definition something like the following (pseudocode
of no particular language):
void customer_uploads_new_document(customer_name, document_name) {
customer = find_or_create_customer(customer_name);
document = find_or_create_document(document_name);
browser.loginCustomer(customer);
upload_page = UploadPage.open(browser);
upload_page.setUploadFile(document);
upload_page.submit();
}
The further details of each of these things is contained in lower level
code. The UploadPage page object wraps all of the details needed to read
or interact with that page, things like element locators, which element
is the submit button, etc. Normally even a new person won't need to
delve into that unless something has changed and it's not working.
Suppose the button was named "Submit" and that was being used to locate
it on the page. If someone renames it "Upload" then the page object will
no longer be able to find it, so someone will have to edit the page
object code to tell it the current name.
It's a matter of seeing the intent of the scenario, first, and digging
into more detail as needed. The browser object, above, might be a
wrapper around a Selenium driver, that can keep the page object from
having to deal with the details of Selenium directly.
>
> Does s/he needs to look into designs to map story to user actions ?
The step definition above is probably enough to understand the user
actions. You don't have to be able to write code to be able to read it
at that level.
>
> Or s/he need to look into implementation of step definitions to
> understand how exactly things work ?
There are different levels of "how things work." There's the level of
business intent. There's the level of clicks on a web page. There's the
level of Selenium calls. There's the level of packets on the network
interface. And others. You rarely need to think about the lowest level,
and if you talk in terms of the lowest, most-detailed level, then it's
harder for people to understand the point of what's being done.
Granted, it seems like a bit more work to write things clearly for
future audiences. I find that this work pays off quite quickly, in weeks
if not days, in my own ability to understand what I was doing when I
wrote it. But I try to keep in mind what someone, a new person or me,
needs in order to understand it a year from now.
- George