Feature #12896

Integrate UnitTests on ci.typo3.org for community extensions hosted on forge.typo3.org

Added by Christian Trabold over 2 years ago. Updated about 1 year ago.

Status:On Hold Start date:2011-02-09
Priority:Could have Due date:2012-10-31
Assignee:Christian Trabold % Done:

30%

Category:-
Target version:- Estimated time:32.00 hours
Votes: 0

Description

We'd love to integrate UnitTesting in ci.typo3.org for all extensions that provide a test-Folder.

But as far as I understand we need a fully isolated TYPO3-Site (including MySQL-Database) for each job including a CLI-User to call the tests. Right?

Currently there are over 1000 jobs. As you can imaging setting up a isolated TYPO3-Site for each job is quite a task.

It would be cool if we could reduce the setup footprint a bit (for example using a sqlite-Database instead of a MySQL-DB, which works very well in Ruby projects). Would that be possible?

Please post your ideas here so that we can integrate this important feature in the next sprint. Thanks!

History

Updated by Mario Rimann over 2 years ago

I think setting up a TYPO3 instance per project that is there all the time is more work than scripting a solution that runs on each build process:

The script
- copies a default TYPO3 installation
- creates a dummy MySQL database named like the extension
- feeding the dump from the dummy installation into that new database
- setting up the _cli user in the DB
- changing the DB-Settings in the localconf.php file
- copying in the extension's files
- installing the extension by adding it to the list of loaded extensions
- deletes the database
- removes the installation by deleting all files

I think this is a manageable step and processing this copy process will be something between 15-20s per run I guess.

Updated by Karsten Dambekalns about 2 years ago

  • Project changed from forge.typo3.org to ci.typo3.org
  • Category deleted (Continuous Integration)

Updated by Christian Trabold about 2 years ago

  • Status changed from New to Needs Feedback

Updated by Christian Trabold almost 2 years ago

  • Status changed from Needs Feedback to Accepted
  • % Done changed from 0 to 20

After sharing this idea with other devs on T3CON11SF I came to the conclusion that we should focus on Unit-Tests for the TYPO3 Core first eg. to gain experience.

When we have this up and running, we think about bringing Unit-Tests-Support to extensions again. For now we assume that the extension developer runs his unit tests regularly.

There is also a movement on DB-Testing in phpunit (http://www.phpunit.de/manual/dbunit.txt) which looks interesting. If you don't need a real DB for our tests, this would definitely have a huge impact on the footprint for our testing infrastructure.

Updated by Christian Trabold over 1 year ago

  • Subject changed from How to integrate UnitTests in ci.typo3.org? to Integrate UnitTests on ci.typo3.org for community extensions hosted on forge.typo3.org
  • Status changed from Accepted to On Hold
  • Priority changed from Must have to Should have
  • % Done changed from 20 to 30
  • Estimated time changed from 16.00 to 32.00

Feedback on "Linux Containers" LXC gathered on T3CON11 sounded not so promising. Will need a Proof-of-concept and further investigation.

Updated by Christian Trabold over 1 year ago

  • Due date set to 2012-02-29

Updated by Christian Trabold about 1 year ago

  • Due date changed from 2012-02-29 to 2012-10-31

Update:

We did a lot of research on T3DD12 and implemented a first prototype to test a new way of running UnitTests on TYPO3v4 Core via travis-ci.org:

http://travis-ci.org/#!/ctrabold/TYPO3v4-Core/

The results are very promising and we're working hard on getting all tests run for the Core.

As soon as we have a stable environment for the Core, we probably can think of getting this process for EXT as well.

Currently the TYPO3v4 Core has much more priority.

Updated by Christian Trabold about 1 year ago

  • Priority changed from Should have to Could have

Also available in: Atom PDF