Skip to main content
Topic: Auto-testing (Read 10319 times) previous topic - next topic - Topic derived from Re: IRC
0 Members and 1 Guest are viewing this topic.

Auto-testing

Quote from: TestMonkey – (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 PR
https://travis-ci.org/emanuele45/Dialogo/builds/13287431

YAY!! :D

That means we can add MOAR tests and let github/travis take care of them! :D

Re: Auto-testing

Reply #1

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 O:-)

Re: Auto-testing

Reply #2

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

And added to the main repo! :D
https://github.com/elkarte/Elkarte/pull/959

It 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... :-[
Last Edit: October 31, 2013, 02:24:48 pm by emanuele
Bugs creator.
Features destroyer.
Template killer.

Re: Auto-testing

Reply #4

Adding some more:
https://travis-ci.org/emanuele45/Dialogo/builds/13343659&url_id=5ca76ac97d9bcaa67cb11f4e8db47cf794849a4b
The build is still failing, but now the setup of the environment (including installation of apache) and the installation of Elk are actually working! :P
I have to work on the errors now. O:-)


Re: Auto-testing

Reply #6

This is so cool  ;D


Re: Auto-testing

Reply #7

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/13418891
5.4: https://travis-ci.org/emanuele45/Dialogo/jobs/13418890
5.5: https://travis-ci.org/emanuele45/Dialogo/jobs/13418889

Re: Auto-testing

Reply #8

Ummm trick question, maybe because php 5.3 is buggy :P ... (is that just from the test or do we need an array_map ? )

Re: Auto-testing

Reply #9

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... lol

The 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.0
Though we are using error_reporting(E_STRICT | E_ALL), so they should act the same... headscratch

Re: Auto-testing

Reply #10

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

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.
Success is not the result of spontaneous combustion, you must set yourself on fire!

 

Re: Auto-testing

Reply #12

Yep.
It already found... 5 bugs I think, mainly related to postgre (anyone wants to guess if we test more on mysql or postgre? :P).