Thursday, October 18, 2012

Cobertura, Java 7, Alternatives

It has been a while since I have used Cobertura and it has come to my attention that it still doesn't support Java 7. I am told by the good people at Netbeans that JaCoCo is an alternative worth trying and so I will.

Update: To integrate JaCoCo into your maven project you might interested to know that Netbeans integration may not work if you don't add the argLine from JacCoCo agent to your surefire plugin. Your maven build config should look something like this. Note the specification of "jacocoArgLine" property name and the passage of it to surefire via the argLine config property.


    
        
            
                org.apache.maven.plugins
                maven-surefire-plugin
                ${plugin.surefire}
                
                    ${jacocoArgLine} -server -Xms512m -Xmx1024m -XX:+AggressiveOpts -XX:CompileThreshold=200
                    once
                
            
            
                org.jacoco
                jacoco-maven-plugin
                0.6.0.201210061924
                
                    
                        
                            prepare-agent
                        
                    
                    
                        report
                        prepare-package
                        
                            report
                        
                    
                
                
                    11508
                    jacocoArgLine
                    ${project.build.sourceEncoding}
                    ${project.build.sourceEncoding}
                    ${project.build.directory}/jacoco.exec
                    ${project.build.directory}/jacoco
                    ${project.build.directory}/jacocoClassDump
                
            
        
    

+1 Netbeans

Wednesday, October 3, 2012

Say "NO" to JUnit and "YES" to TestNG

The truth is JUnit is pretty sucky for anything but the simplest form of unit testing. Don't get me wrong, JUnit will always have a place in my heart but its functionality leaves much to be desired, especially compared to TestNG. If you are starting a new project you should most definitely say "NO" to JUnit and say "YES" to TestNG

Support for TestNG is robust on pretty much all the standard IDEs now (Netbeans, Eclipse, IDEA) which is an indication that there's wide adoption and support for it. With the Eclipse TestNG plugin there's even the ability to convert your old JUnit tests to TestNG tests. It's not a perfect and straight conversion and you will have to do some massaging but it beats doing it all manually.

If you are ready to make the switch mkyong.com has a pretty good comparison  between JUnit and TestNG.

Tuesday, October 2, 2012

println "Hello World!"

Hello All,

Over the weekend I attended the Seattle Google Developer Group DevFest. It was an amazing experience. We got to hear thoughtful discussion about developing applications for Tablets/Google TV as well as developing apps using PhoneGap and HTML5. Saturday was mostly all lectures but Sunday was a hackfest where you got to work on whatever you like and compete for prizes. All though we weren't able to finish our project in time to demo it my team put together a solid skeleton for an application that would allow us to learn how to develop Andorid applications for bother tablet and phones. 

If you're interested in the project please checkout the github repository for our project. I am hoping to continue to further refine and develop a complete application at some point as an exercise in developing native application and would encourage you to take a look at our mock-ups (we use WireframeSketcher) if you're interested in developing something similar as a learning exercise.