Showing posts with label testing. Show all posts
Showing posts with label testing. Show all posts

Sunday, October 25, 2015

#JavaOne2015

#JavaOne2015

My fifth JavaOne started today.  I attended a Java University class.  It was interesting to be on the other side of that sort of presentation.

Red Hat is well represented this year.  There is a microsite on Red Hat Developer.

Stop by the Red Hat booth in the vendor hall if you are attending.  We have presentations all day long, and there is a rumor about trucker hats...

The agenda at our booth this week:

Monday, October 26th

10:15 - 11:00 
Standardized Extension-Building in Java EE with CDI and JCA

- Jason Porter

11:45 - 12:30
Taming Microservices Testing with Arquillian Cube
- Aslak Knutsen, Alex Soto & Bartosz Majsak

1:45 - 2:30
Docker for Java EE Developers
- Rafael Benevides & Markus Eisele

3:30 -  4:15
Shenandoah: An Ultralow-Pause-Time Garbage Collector for OpenJDK
- Christine H. Flood

Tuesday, January 11, 2011

SOAPui

This post is a shameless plug for soapUI.

I came across soapUI while running through the Self-Paced Workshop for the JBoss SOA Platform (pdf download.) It is incredibly simple to create a test for a web service. There is even an Eclipse plugin, but I haven't tried that yet.

Happy coding.

Friday, June 25, 2010

groovy.lang.MissingMethodException: No signature of method: static .list() is applicable for argument types:

I've started using Grails recently. Its really nice. Productive, easy to get up and running, etc.

My first stab at testing a Controller produced :
groovy.lang.MissingMethodException: No signature of method: static dbtestapp.Team.list() is applicable for argument types:
(org.codehaus.groovy.grails.web.taglib.GroovyPageAttributes) values: [[max:10]]
Possible solutions: is(java.lang.Object), wait(), wait(long), print(java.lang.Object), split(groovy.lang.Closure), use([Ljava.lang.Object;)
at dbtestapp.TeamController$_closure2.doCall
A little weird. list() is a dynamic method and should be on the object.

Its a known issue in the Grails Jira. The solution is to stick the test inside the "integration" package.

Friday, April 10, 2009

XmlUnit

XmlUnit is an insanely great tool. It has saved me a ton of time in the past few weeks.

I log the differences from my unit test like this :

        XMLUnit.setIgnoreWhitespace(true);
Diff xmlDiff = new Diff(expectedXml, result);

DetailedDiff myDiff = new DetailedDiff(xmlDiff);
List<Difference> allDifferences = myDiff.getAllDifferences();
for(Difference d : allDifferences){
log.debug("difference : " + d);
}


The "result" string comes from a Groovy class using XmlSlurper. Also I usually generate "expectedXml" from a Groovy class.

Friday, September 19, 2008

DBUnit and slf4j

I had never heard of slf4j before this morning, and I have no idea why.  I'm usually pretty up on stuff.

I started to pull some test data with dbunit ( in case you aren't familiar with dbunit here's an excellent intro by Bill Siggelkow ), and when I ran it I got the following error :

Exception in thread "main" java.lang.NoClassDefFoundError: org/slf4j/LoggerFactory
    at org.dbunit.database.AbstractDatabaseConnection.<clinit>(AbstractDatabaseConnection.java:46)
    at [my package and class].main(DBUnitExporter.java:62)

The solution is to download slf4j, and add slf4j-api-1.5.2.jar and slf4j-log4j12-1.5.2.jar to the classpath (I'm using Eclipse so I threw it in the run dialog.)
Blogged with the Flock Browser