CucumberStudio-TestComplete Integration, Supporting Test Scenarios that touch multiple Web Apps
Overview:
a) We have multiple web-based applications. It is common for a single test case to interact with multiple web-based applications.
b) Using CucumberStudio project to create BDD Scenarios. CucumberStudio project is bound to TestComplete project.
Two questions about organization and supporting this type of arrangement:
1) Naming and organizing the action words within CucumberStudio. It seems to me that when users create action words in cucumber studio, they need to indicate (within the name) which web-application it is using. a) Common functionality exists across web applications ie) login, logout etc... b) this will aid in the automating of the action words/step definitions in TestComplete. Does this make sense? Or is there a better way?
2) Because we have 1 CucumberStudio project bound to 1 TestComplete project, and we have test scenarios that interact with multiple web based applications, then it seems to me that the TestComplete project's NameMapping has to contain everything. All the objects for all the applications your test scenarios will touch. Is this correct? If I have a test scenario that needs to interact with multiple web-applications (or any type of application for that sort), I have to put all the objects within a single NameMapping - within the one TestComplete project?
Seems like it grow very large, very quickly. Worried about it becoming unmanageable. Is there a way to support test scenarios like this with more than one NameMapping entity?
the benefit of name mapping is that it stores the object identifies for the elements that you are interacting with, such that if in a future release, should there be a significant enough of a change in your applications, you test cases will fail but you would only have to update the object identification properties in one place (and all of the tests referring to that object will now be "fixed" - as in no longer has those identification errors).
with that said, as tphillips pointed out, you do not need to rely on name mapping for many web applications you are testing since you can just refer to xpath expressions and css selectors using the FindElement() method.
The downside is that your tests may be more prone to breaking upon future releases and require a bit more maintenance, but if you think that the size of the name mapping repository is a show stopper, this can be a workaround
def use_no_nameMapping(): page = Sys.Browser("*").Page("*") #define your web app at the page lvl page.FindElement("whatever selector").Click() #now you are interacting with the UI without relying on Name Mapping