Yii Framework Forum: yii2 + continuous integration + testing ? - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

yii2 + continuous integration + testing ?

#1 User is offline   nguyendh 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 266
  • Joined: 21-March 11

Posted 13 April 2016 - 07:29 PM

Just curious if anyone has successfully use Continuous Integration (CI) with a Yii2 project ?

I am hitting a road block with my career. Never write any tests. All tests are performed by human. I know it is not very useful and it is not the way to do software development in 2016.

I've spent some times surfing the internet and picked up pieces so I kinda have a roadmap of how "pro" test their software.

1. they have unit tests
2. they have functional tests
3. they have acceptance tests
4. they have continuous integration server

I think the way it works is somehow you setup your continuous integration to automatically run unit, functional, acceptance tests when you push new code. If all tests are passed, the new code are pushed directly to production servers. If 1 test fails, continuous integration will notify you.

That's general idea. Am I right ?

About detail on how to do each of them in Yii2, I aware of Codeception but I wonder if there are testing framework that are UI friendly , drag and drop ?

Also, any recommendations for Continuous Integration ? Something is simpler, easy to use, minimal setup and works best with Yii2.

#2 User is offline   samdark 

  • Having fun
  • Yii
  • Group: Yii Dev Team
  • Posts: 5,222
  • Joined: 17-January 09
  • Location:Russia

Posted 14 April 2016 - 07:07 AM

Well, it's implemented for the Yii itself via Travis CI.


the new code are pushed directly to production servers

That's a bad idea. 100% code coverage with absolutely complete test cases is utopic situation so deploying to production should include monitoring and supervising for some time after deployment is done. i.e. it should be automated but should not be triggered automatically.

There are no drag and drop unit testing frameworks.

As for CI, I'd go with Jenkins if we're talking about setting up CI on your own server.
Yii 2.0 Development Cookbook

Enjoying Yii? Star us at github

Support me so I can work more on Yii: https://www.patreon.com/samdark

#3 User is offline   Olexiy Danylevskyi 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 8
  • Joined: 20-July 13

Posted 17 January 2017 - 03:02 PM

There is no easy way) but when you will configure your CI/CD stack you will be very happy.

You can try to use Codeship + Cloud66 + AWS/Heroku for CI/CD. I am using it for some of my projects. Also you should obviously read about Docker and try it localy.

For testing you can use Selenium. Even so it has Firefox plugin that you can use for testing. It remembers your/user flow and
repeat it in future (maybe something you are searching for).

Codeception is good for testing, because you can use it straight away.

Share this topic:

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users