You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
HI Team,
Automated my application using cypress custom command and written function in plugins file for reset Network Element.
But now I need to go with POM for follow standardization. For this I need to write methods as general and use that in my page object model classes and call these methods from testcases.
Kindly let me know can I implement this pattern in cypress.
My folder structure:
SampleProject
----cypress
----fixtures
pom
a.json
b.json
----lib
--dataoperation.js(It contain methods for dataoperation like readfile and return specific content and other)
--remoteConnection.js(It contain methods to connect other server and execute cmd which is passed as an argument and get value)
----po(The above module will be imported in the below modules and call that function and get the value and utilized.)
--login_po.js(import dataoperation.js)
--configuration_po.js(imported dataoperation.js, remoteConnection.js)
--service_po.js(imported dataoperation.js, remoteConnection.js)
----integration
---a1.spec.js(This test suite will import pageobject modules(login_po, configuration_po, service_po.js)
(it has testcase for login. This will call login method which is available in login_po.js)
(It has testcase for configuring NE. so that it will call method which is available in configuration_po after creating object)
----plugins
---index.js(This will have function for connecting and executing cmd in other server and return. These will get called using cy.task from configuration_po)
I started the above and when i execute a1.spec.js , looping over 1st testcase only.
Kindly let me know how can I achieve this?. and any samples in these design?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
HI Team,
Automated my application using cypress custom command and written function in plugins file for reset Network Element.
But now I need to go with POM for follow standardization. For this I need to write methods as general and use that in my page object model classes and call these methods from testcases.
Kindly let me know can I implement this pattern in cypress.
My folder structure:
SampleProject
----cypress
----fixtures
pom
a.json
b.json
----lib
--dataoperation.js(It contain methods for dataoperation like readfile and return specific content and other)
--remoteConnection.js(It contain methods to connect other server and execute cmd which is passed as an argument and get value)
----po(The above module will be imported in the below modules and call that function and get the value and utilized.)
--login_po.js(import dataoperation.js)
--configuration_po.js(imported dataoperation.js, remoteConnection.js)
--service_po.js(imported dataoperation.js, remoteConnection.js)
----integration
---a1.spec.js(This test suite will import pageobject modules(login_po, configuration_po, service_po.js)
(it has testcase for login. This will call login method which is available in login_po.js)
(It has testcase for configuring NE. so that it will call method which is available in configuration_po after creating object)
----plugins
---index.js(This will have function for connecting and executing cmd in other server and return. These will get called using cy.task from configuration_po)
I started the above and when i execute a1.spec.js , looping over 1st testcase only.
Kindly let me know how can I achieve this?. and any samples in these design?
Thanks & Regards,
Senthilkumar TR
Beta Was this translation helpful? Give feedback.
All reactions