lunes, 17 de septiembre de 2007

Nueva metodología

Hoy voy a intentar algo nuevo. Voy a usar esto como un sandbox, o un patito de hule. Voy a poner las boludeces que pienso aca, les guste o no.

Si no les gusta, me la chupa porque esto no lo lee nadie, igual =)

Pensamientos de exarkun sobre testear mi pedacito de modulo que habla con bases de datos

12:19 < exarkun> Lacrymology: So you don't need to be able to write tests for code that's like adbapi
12:19 < exarkun> Lacrymology: I assume you're using adbapi
12:19 < exarkun> Lacrymology: So a reasonable thing for you to do to test such code might be to provide a stub ConnectionPool implementation
12:19 -!- Peaker [n=Peaker@87.68.144.236] has quit ["mIRC down, pidgin up"]
12:19 -!- Peaker_ is now known as Peaker
12:19 < exarkun> Lacrymology: One which doesn't actually use a database at all.
12:20 < Lacrymology> exarkun: yes, that's what I thought of. That and some kind of mock db module
12:20 < exarkun> Lacrymology: The key is splitting up units. Don't cross too many layers of abstraction in a single test.
12:20 < Peaker> does anyone know a good free file hosting service that's not too much trouble and actually works?
12:20 < Peaker> you know what, it can actually be troublesome, just has to work :) mediamax is troublesome AND doesn't work :(
12:21 < exarkun> Lacrymology: Test that your SQL drives the database correctly independently from your tests that the SQL issued to the
ConnectionPool is what you expect.
12:21 < radix> o/` the glock is cocked, the sheep begin to drop o/`
12:21 < exarkun> Lacrymology: Then you only have to worry about integration testing. ;)
12:21 < exarkun> which no one knows how to do well.


es importante

como carajo es que se estan autocomiteando cambios? google..

pfff.. "start transaction" es necesario? a quien se le ocurre? SECURITY FIRST!!!!

conchos

mierda, tema de engines. Estabamos usando un engine que no soporta transacciones.. cuantas cosas que hay que saber en esta vida.

Ahora hay que ver que mierda hacer con el servidor de comercio.. encima medio que me la soba un poquito, ni ganas de pensar esta semana

puta madre, hable con kris y me saqué... damnit

3 comentarios:

Lucy in the sky with diamonds dijo...

Yo si lo leo, Lacry,
Debería saberlo a estas alturas.

De todos modos, el fucking SQL me tiene harta.
De paso, estoy buscando analistas de testing (entre otros) que manejen excelent SQL,
si sabe de alguno, tenga a bien avisarme, por favor.
Beso
Lucy.-

Zobeid@ dijo...

ay!
yo quiero entender
pero ni modos
es tarde para volver a secundaria.

D2F dijo...

Jelou ente psicozomatizador de bártulos espaciales:
Para testing unitario hay varios frameworks.
Conocerás seguramente JUnit (o algo así para Java, recordá que soy del lado oscuro de la fuerza, yo uso NUnit aunque el que viene integrado con VSTS está muy bueno y es un homenaje a NUnit justamente). Pero hay otras cositas piolas como frameworks que facilitan la creación de mock objects para justamente no tener que lidiar con todo a la hora de hacer un test unitario. Para .NET existe Rhino Mocks, Type Mock y otros más. Seguramente para el lenguje que uses algo así habrá. Esto está piola para no tener que crear todas tus putas mock classes solo para un test, con el agregado de que podés setear qué querés que te devuelva al invocar sus métodos o propiedades, setear callbacks y muchos confites más. Bue, joup dis jelps.
Adío!!
D2F