Auto-testing October 30, 2013, 06:15:45 pm Quote from: TestMonkey – July 15, 2013, 02:39:45 am(06:21:19 PM) elk_core: [Elkarte] engelnyst synchronize pull request #667: Add a ScheduledTasks.subs.php file for scheduled tasks (master...tasks) http://git.io/B4OF2g(06:30:51 PM) Norv: Oh, emanuele: when you're in the mood for installing an environment for testing, http://about.travis-ci.org/docs/user/languages/php/(06:32:23 PM) Norv: Setup Elk, then run the tests (i.e. the all_tests.php we have), then shut it down. Travis is integrated with github, which makes it really nice, you'll see the results on every PRhttps://travis-ci.org/emanuele45/Dialogo/builds/13287431YAY!! That means we can add MOAR tests and let github/travis take care of them!
Re: Auto-testing Reply #1 – October 30, 2013, 07:44:18 pm Very awesome !!! I see a lot of projects that use Travis, just have never had the time to set anything up. We still need to add more test in more areas, but as we do this will help us break fewer things
Re: Auto-testing Reply #2 – October 31, 2013, 04:03:15 am There is still postgre that doesn't work at the moment for the way the "installer" works, I'll try to fix it later today.
Re: Auto-testing Reply #3 – October 31, 2013, 09:08:55 am And added to the main repo! https://github.com/elkarte/Elkarte/pull/959It tests for both mysql and postgre with php 5.2, 5.3, 5.4 and 5.5.When the beta will be out I'll investigate how to do the tests on SQLite too (I think I have to checkout the other repo and move some files around, not much more I hope).ETA: it's still broken, sorry...
Re: Auto-testing Reply #4 – October 31, 2013, 07:42:54 pm Adding some more:https://travis-ci.org/emanuele45/Dialogo/builds/13343659&url_id=5ca76ac97d9bcaa67cb11f4e8db47cf794849a4bThe build is still failing, but now the setup of the environment (including installation of apache) and the installation of Elk are actually working! I have to work on the errors now.
Re: Auto-testing Reply #5 – November 01, 2013, 08:00:19 pm This time it really works! https://travis-ci.org/emanuele45/Dialogo/builds/13388825Tomorrow I'll make the commits nicer and I'll send the PR.
Re: Auto-testing Reply #7 – November 02, 2013, 07:30:19 pm Question of the day:Code: [Select]$_GET['action'] = array('test1', 'test2');$_GET['action'] = (string) $_GET['action'];Any idea why php 5.4 and 5.5 returns an error, while php 5.3 does not?5.3: https://travis-ci.org/emanuele45/Dialogo/jobs/134188915.4: https://travis-ci.org/emanuele45/Dialogo/jobs/134188905.5: https://travis-ci.org/emanuele45/Dialogo/jobs/13418889
Re: Auto-testing Reply #8 – November 02, 2013, 08:18:12 pm Ummm trick question, maybe because php 5.3 is buggy ... (is that just from the test or do we need an array_map ? )
Re: Auto-testing Reply #9 – November 02, 2013, 08:39:40 pm Nope, no need for array_map or alike, it is just test that checks for the error in case it is an array.Yeah, the buggy is the first thing I thought, but it looks weird because seems a rather big error... lolThe only difference I was able to find is this:Quote from: http://php.net/manual/en/errorfunc.constants.phpSince PHP 5 but not included in E_ALL until PHP 5.4.0Though we are using error_reporting(E_STRICT | E_ALL), so they should act the same... headscratch
Re: Auto-testing Reply #10 – November 03, 2013, 04:50:41 pm I was ready to blame travis or simpletest for the problems with postgre, and instead it is a legit bug!! xD
Re: Auto-testing Reply #11 – November 03, 2013, 06:32:45 pm haha, already paid off it looks like. I'll have to look more into this. Sounds cool to have some automated testing if I'm understanding this right.
Re: Auto-testing Reply #12 – November 04, 2013, 04:55:38 am Yep.It already found... 5 bugs I think, mainly related to postgre (anyone wants to guess if we test more on mysql or postgre? ).