Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Recording Selenium tests for functional Plone test cases

Tags:

selenium

plone

I'd like to use Selenium for creating simple functional tests against Plone add-ons. The main driver here is that non-programmers can create and understand test cases with some effort, because they see in a web browser what's happening. What is the recommended best practice to

  • The test case prepares Plone site environment where the test will be run (installs add-ons, mocks up mail host, creates sample content)

  • How to run Plone functional test case to the point you can start a Selenium recording in a browser and how to open a browser with recording enabled?

  • How later run the recorded test output from Python code?

Are there other test recording frameworks out there which you combine with Plone? Able to tests against Javascripted UI is a requirement.

like image 943
Mikko Ohtamaa Avatar asked Nov 14 '22 06:11

Mikko Ohtamaa


1 Answers

My guess is that there are tools that do the individual steps independently, but those tools don't work together exactly as you describe.

In my experience, the quality of recorded tests is so bad that a programmer will have to rewrite them anyway. It only gets worse when you have a lot of JavaScript. If in addition, you have a site that uses AJAX, one of the problems that occurs is that you will sometimes have to wait for a specific element to appear, before doing the next click, and this is where most recorders will fail.

I would also love to hear about a tool that is targeted to end users, and allows them to record and run Plone tests on their own, and if anyone knows about this kind of project, I would really like to get involved in its development.

like image 159
Maik Röder Avatar answered Dec 26 '22 12:12

Maik Röder