Greach 2013

Déjate de excusas y crea tests para tus aplicaciones Grails

Mario García  · 

Presentación

Vídeo

Transcripción

Extracto de la transcripción automática del vídeo realizada por YouTube.

yeah I'm very happy right now because i'm i'm working on currently with grails every day so it makes me very happy now aday so what is this what is this talk about well this talk is is about why do i why i do testing why most of the people must

be doing testing so do we need testing really well yes i think so because we are not perfect and it's not so important that we are not perfect that we already knew that is more about when do we realize that we have committed the mistakes most of the time

is simply simply too late okay so when we just when we realize we just have that kind of face so why i do testing and the first thing i thought it doing texted doing testing could make me more perfect as a parameter and made me flawless but that's not

simply true because in fact it reminds me every day that i'm really bad / amer so i have to improve every day my skills of course the other thing i thought it was well maybe they can protect my application one hundred percent avoiding backs but that's

not true either because they cannot protect your your application but instead they can help me and to detect and before it's too late ok so i'm going to i'm going through a great application and i'm going to show you why i normally do in a

like when implementing a functionality in the application and working with well the first thing i normally do is integration testing why first because i think important things in my application should be in the should be in the services instead of the controllers

so the less code in the controllers i think is the better so i think that is in one important rule to do in your in your application just keep it simple and if you had something really complicated keep it in these services so what do we normally test in inter

patient system and integration testing well normally we we are going to be testing external assistance such database web services q systems like a rabid or JMS and anything in between so what are the weapons done I normally use when when testing my applications

in the in the integration layer well of course i will be using the Grail single integration test which is basing J J's unit I really encourage you to use the interactive mode which is available since version 2 20 and if you are still in some previous version

I really encourage you to migrate those applications to at least 2.0 and of course the guard plugin which is a is based on the interactive mode which is going to save you a lot of time so it's very it's very important to keep in mind that using the

n to interactive mode especially when you're doing testing you are going to save a lot of time apart from that I'm not verified using every plane that come across so I stick to spark the fixtures plugin and the build test data spoke for everything

almost everything and then for using persistent in my testing I would be using fixtures and the real test data I'm going to explain you why well the good thing about the the greatest integration test is that it comes by the fall of course but but also

if you come from Java that is based in Jade unit so if you have juice unit you will be more comfortable doing testing in in your greatest application of course when you are just when you are doing integration test the application is up and running so it's

very important to keep that in mind because you can inject your services in your in your test again it's important to keep in mind that always that you're doing any kind of testing in grails do better use the the interactive console because again it's

going to save you a lot of time so what can spoke bring us doing the test well for me the most important thing is that the testing is going to be more natural the way that we explain we are coding the test and it's very important because i'm a lazy

parameter and and i don't usually document my code so i have found that using a spoke i can be documenting my code and and also be calling at the same time so it's very it's very important the other thing we will see the paramedic tables in is

[ ... ]

Nota: se han omitido las otras 1.931 palabras de la transcripción completa para cumplir con las normas de «uso razonable» de YouTube.