Re: dev Digest, Vol 51, Issue 1
S7Design <[email protected]> Sat, 13 Jun 2015 12:54:10 -0000
| Newsgroups | gmane.comp.otrs.devel |
|---|---|
| Message-ID | <[email protected]> |
Hi all, Moritz it is great idea. I have already thought about it. We must have improved the tests. I also told about it with my team in S7design. We are doing a lot with tests, and we often have to clean up VM where the tests are run. We try to took care about this with Selenium tests, as you mentioned on way that directly entities are deleted from DB. The problem is in case the test is not completed successfully. In this situation the cleaning up is not executed. I think that we can solve this issue with transactions. I also made some scripts which clean up and restore system in the state that had been before testing. It is not for public purpose, it looks like hacking and hardcode scripts ;) I believe that your idea is much better. I like it. I am sure that I will look into this and try to do something like this. To be honest I don't have enough experience about it now, but so the challenge is bigger :) I believe it could be good improvement for testing. Regards Zoran S7Design Sent from my BlackBerry® PlayBook™ www.blackberry.com www.blackberry.com ---------- From: "[email protected]" <[email protected]> To: "[email protected]" <[email protected]> Sent: June 5, 2015 2:00 PM Subject: dev Digest, Vol 51, Issue 1 Send dev mailing list submissions to [email protected] To subscribe or unsubscribe via the World Wide Web, visit http://lists.otrs.org/cgi-bin/listinfo/dev or, via email, send a message with subject or body 'help' to [email protected] You can reach the person managing the list at [email protected] When replying, please edit your Subject line so it is more specific than "Re: Contents of dev digest..." Today's Topics: 1. Idea: run tests in transactions, roll them back (Moritz Lenz) ---------------------------------------------------------------------- Message: 1 Date: Fri, 5 Jun 2015 10:08:32 +0200 From: Moritz Lenz Subject: [dev] Idea: run tests in transactions, roll them back To: "[email protected]" Message-ID: <[email protected]> Content-Type: text/plain; charset="utf-8"; Format="flowed" Hi all, in order to isolate tests from each other, we could consider starting a database transaction before running a test file, and then rolling back the transaction after the test file finished running. Then new objects (queues, users, groups, tickets) wouldn't need to be cleaned up manually at the end of a test, and the cleanup would even happen if a test aborts early. However, it'd only work for tests that don't want to establish their own DB connections, and not for tests that rely on inter-process communication (those couldn't share a transaction). Do you think this idea is worth pursuing? (afaict all of the supported DBs implement transactions just fine, except mysql on myisam, and DBI already provides a simple interface ($dbh->begin_work, $dbh->commit, $dbh->rollback)). Cheers, Moritz -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/x-pkcs7-signature Size: 6348 bytes Desc: not available URL: ------------------------------ _______________________________________________ dev mailing list [email protected] http://lists.otrs.org/cgi-bin/listinfo/dev End of dev Digest, Vol 51, Issue 1 ********************************** _______________________________________________ OTRS mailing list: dev - Webpage: http://otrs.org/ Archive: http://lists.otrs.org/pipermail/dev To unsubscribe: http://lists.otrs.org/cgi-bin/listinfo/dev