Back

Explore Courses Blog Tutorials Interview Questions
0 votes
1 view
in DevOps and Agile by (19.7k points)

I am currently setting up a development environment for my new project and I am thinking hard about one thing. I plan on using Yii. I want to have functional tests automated, I already have gerrit and Jenkins in place, working.

I read a note somewhere and found out that selenium has something like html suite. I never heard of it before, I always wrote my tests to be run via PHPUnit. I used default Yii functional tests environment as described here.

So my question is, what are pros and cons of both approaches? I already can think of one pro and con of html suite. Pro is, that writing tests is really easy - you just "click" them in Selenium IDE. The con is, that I probably would have to run db fixtures before testing and I couldn't change them, or run them like - load fixtures, run test, load fixture, run test, but I guess that would be make the tests much sloppier. What do you think/what is your experience in that matter?

1 Answer

0 votes
by (62.9k points)

The easier way to write functional tests would be to download an add-on for selenium IDE and then add the PHP formatter for this addon, and you can make and export functional tests very easily.

Then you should configure your protected/config/test.php and protected/tests/bootstrap.php

You must apparently then edit the protected/tests/phpunit.xml file and remove any browser, other than firefox.

Then change the test made by this addon and change the name of the class to WebTestCase and remove the setUp()

Now, you are ready to run tests!

Welcome to Intellipaat Community. Get your technical queries answered by top developers!

28.4k questions

29.7k answers

500 comments

94k users

Browse Categories

...