Why should I avoid using DbUnit to test MySQL?

I recently contacted some TDDs using PHPUnit. I must test the database-based application and read about the DbUnit extension that I planned to research and implement in the coming weeks.

Nevertheless, I met this presentation by the man himself - Sebastian Bergmann. He has a slide called “Avoid Testing Against MySQL If You Can,” threw some doubts on my escapade.

Can someone explain the reasons why I should not test MySQL?

thank

+5
source share
3 answers

Two reasons:

  • it's slow (and unit tests should be fast)
  • , ( ?)

, , DAL , SQLite. , .

- SQL SQLite. , , , DAL MySQL. , - unit test, ( ) - SQLite, 100% , MySQL?

, ​​ DAL/DAO , , , ; ( ORM, ).

: - . TDD, ( : / , ) - , , , , . , .

, :

  • ", ..."
  • ", ... "
  • ,
  • ", , !"
  • " ?"

, , .

, ; , +/- 20 ( DAL, , IoC ), , "Current build breakers" . , .

, - SQLite. , ( , ).

+6

33, .

( , )

, .

mySQL, mySQL. SQLite mySQL.

, , , , . , . mySQL. ( ).

, SQL, , , .

- . db, .

SQLite, .

+3

DbUnit ( MVC, ORM-), . ( ) .

- ( ) , , .

, , . , ~ 500 , . 30-40 . .

+2

All Articles