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.RegardsZoranS7DesignSent from my BlackBerry® PlayBook™www.blackberry.comwww.blackberry.comFrom: "dev-requ...@otrs.org" dev-requ...@otrs.orgTo: "dev@otrs.org" dev@otrs.orgSent: June 5, 2015 2:00 PMSubject: dev Digest, Vol 51, Issue 1Send dev mailing list submissions to
dev@otrs.org
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
dev-requ...@otrs.org
You can reach the person managing the list at
dev-ow...@otrs.org
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: "dev@otrs.org"
Message-ID: 55715900.2040...@noris.de
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
dev@otrs.org
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