
metricfu/metric_fu Effective Unit Testing with DbUnit Published on ONJava.com ( See this if you're having trouble printing code examples by Andrew Glover 01/21/2004 Introducing DbUnit Writing unit and component tests for objects with external dependencies, such as databases or other objects, can prove arduous, as those dependencies may hinder isolation. Utilizing mock objects or stubs is one strategy for controlling outside dependencies. The open source DbUnit framework, created by Manuel Laflamme, provides an elegant solution for controlling a database dependency within applications by allowing developers to manage the state of a database throughout a test. Automated tests are a critical facet of most successful software projects. Getting Started The first step in configuring DbUnit involves the generation of a database schema definition file. For example, a database table EMPLOYEE would be described in SQL as follows: Moreover, a sample data set found in EMPLOYEE could be: DbUnit in Code Code Example DbUnit in Ant
Windows – Howto Instalación de Qemu en Windows | www.elsotanillo.net de Juan Sierra Pons Qemu es un emulador Open Source de Sistemas Operativos que puede correr tanto en Windows como en Linux. En este Howto, veremos su instalacion en Windows.La emulacion de Sistemas operativos nos puede ser muy util para: Poder correr programas antiguos que no tienen su equivalente actual. Por ejemplo, programas especificos creados para entornos MS-DOS que no es posible migrar. Como pueden ser algunos de contabilidad, inventarios, stocks, etc.Poder jugar a juegos antiguos que no corren en nuestro sistema operativo habitual: Juegos de Windows95, MS-DOS, etcHacer pruebas de sistemas operativos, distribuciones Live! ¿Que es Qemu? QEMU es un emulador Open Source que consigue una buena emulación usando traducción dinamica de las operaciones entre la maquina anfitriona o principal y la maquina huesped o emulada. Emulacion completa del sistema. Tambien existe un modulo Acelerador KQEMU (Propietario) disponible que optimiza el rendimiento en el caso de que un PC es emulado dentro de otro PC.
charliesome/better_errors Useful tools for writing Selenium tests I've been writing a lot of Selenium tests lately and I've been using some tools that I find extremely useful for composing table-style tests. Let me start by saying that writing GUI-based tests for Web apps is no fun, no matter what your testing tool is. You need to navigate through pages, fill and submit forms, and verify that certain elements are present on the pages. Doing all this manually can quickly become tedious and kill whatever joy you may find in testing. If you're writing Selenium tests, these activities are, if not fun, at least tolerable due to the existence of the Selenium Recorder ("the Selenium Recorder -- can't imagine life as a Web app tester without it" seems like a good line for a commercial :-) The Selenium Recorder (which I'll refer to as SelRec from now on) is a Firefox extension that you launch via the Tools menu. SelRec can also help with certain Selenium assertion commands. Note that XPath expressions don't work that well in Internet Explorer. Updates
crea un sistema operativo portable bueno muchachos en esta guia que me incontre por ay les voy a enseñar como hacer un sistema operativo portable BackTrack Portable BackTrack (o tu sistema operativo favorito, la guía esta abierta a cualquiera de ellos) materiales Memoria USB (mínimo 1GB de espacio) Primero necesitamos la herramienta Moka5 que la podemos descargar aquí, también necesitamos la ISO del BackTrack podemos bajarla aquí, una vez tienes las herramientas necesarias, empezaremos a crear nuestro BackTrack portable en nuestra memoria USB. ared.com/file/YpGGX-HJ/LivePCengine-dragonjarorg.html 1). 2). 3). 4). Nos aparecerá el siguiente pantallazo: Donde debemos escoger la opción “Make you own LivePC”, la otra opción es para descargar o ejecutar en línea algunas maquinas prefabricadas (al parecer ya no están disponibles después de que moka5 se volviera comercial). 5). 6). PD. bueno espero que les valla bien
Sucking less at writing Cucumber — Rendered Text I wrote my first Cucumber scenario about five months ago. It went something like this: Scenario: Changing email Given I am logged in And I am on the homepage When I click on "Account" And I fill in "email" with "milos@example.com" And I press "Change Email" Then I should see "Email successfully changed" When I visit "My profile page" Then I should see "milos@example.com" Maybe my naivete was not solely to blame; I was told it was so easy “that it could be taught to a secretary”. Some of the problems with the above scenario are: It’s too long and verbose It’s not using the domain language Read the scenario. Background: Given I am logged in Scenario: Changing Email Given I am on my account page When I change my email Then I should see that my email has changed Using web steps makes you write very imperative scenarios that you have to rewrite each time you change something. We still test if this whole system works but if I change how it works I only need to change the step definitions.
Cedric Beust Untested code is the dark matter of software Recently, somebody posted an innocent-looking question on the JUnit mailing-list, basically saying that he finds unit testing hard, confessing he doesn't always do it and asking for opinions about whether his situation is normal and if everybody else manages to do testing 100% of the time. I have to say, even I underestimated the virulence of the responses that followed. I'll skip the messages along the line of "I test 100% of the time, something is wrong with you" to focus on another response from Robert Martin that crystallizes an extreme attitude that is so detrimental to Java software in general. Code coverage for these tests should be very close to 100% (i.e. high 90s). That's a bit extreme, but not entirely untrue. If you don't have this [code coverage], then you don't KNOW that your code actually works. There are plenty of ways to know that your code works. The argument about "TIME" is laughable. I almost always find bugs when I test.
Trucos Google, Trucos de búsqueda y Curiosidades sobre el buscador Todo sobre Google Buscar frase exacta - Si quieres buscar una frase exacta, introdúcela entre comillas (""). Por ejemplo: "diarios deportivos" Encontrar páginas que incluyan determinadas palabras - Para encontrar páginas que incluyan determinadas palabras, pero no otras, deberemos incluir el signo '-' delante de las que no queremos buscar. tienda -online Encontrar páginas que incluyan una determinada palabra u otra - Si pretendemos encontrar una determinada palabra u otra, usaremos 'OR' (o bien el símbolo '|' (AltGr+1). tienda (zapatos OR pantalones) tienda (zapatos | pantalones) Forzar palabras para su búsqueda - Hay numerosas palabras (en español: 'a', 'de', 'el', ...; en inglés: 'to', 'of', 'the',...) que Google no tiene en cuenta en sus búsquedas, a no ser que lo indiquemos. el mundo +el mundo Uso de comodines - Se puede hacer uso de comodines. "los * años" "los * * años" Mayúsculas y minúsculas - No es necesario distinguir las mayúsculas de las minúsculas. Uso del comando Link: allintext:hacker
Summer Breeze: creates dynamic Rails fixtures for Jasmine tests On stage at Red Dirt Ruby Conference, Noel Rappin has released Summer Breeze, a gem that makes working with Jasmine in Rails a bit easier. Summer Breeze dynamically creates Rails fixtures for your Jasmine tests. Installation and usage To install via RubyGems: gem install summer_breeze … and run the bundled generator: rails generate summer_breeze:install Now you can define you fixtures in the generated initializer: fixture "PostsController##index.body_container" You then have several options for telling Jasmine about your new fixture: sb.loadFixture(fixture_name) sb.findSelector(fixture_name, selector) sb.readFixture(fixture_name) A sample test might look like: it("hides text when asked", function() { $form_container = sb.findSelector('login', '.form_container'); toggle_handlers.init(); $hide_link = $form_container.find(".toggle_link"); expect($hide_link).not.toHaveClass("hidden"); $hide_link.click(); expect($hide_link).toHaveClass("hidden"); }); [Source on GitHub]
15 Awesome Google Search Tips and Tricks You may be using Google search multiple times per day to locate something on the web. Learning how to use Google search effectively can boost your productivity instantly. This article is part of the on-going Productivity Tips for Geeks. In this article let us review 15 awesome google search tricks that will improve the quality of your online life. Note: Also, check-out our earlier article about 15 Awesome Gmail Tips and Tricks, and 15 Essential Gmail Lab Features. 1. If you want to know current local time in a particular city, use the following method. Syntax: time in PLACE time Los Angeles Fig: Find out current time of any worldwide city 2. If you want Google to exclude a word while searching the web page, use – (minus) before the search as shown below. ebooks -free 3. Instead of searching for only the given word, using ~ before the keyword you can instruct Google to search for webpages with the exact given word or the words which has same meaning. 4. 5. bash examples OR programs 6. 7. 8.
noelrappin/summer_breeze