Findings of eclipse with testng

First of all I’ve always used JUnit and not TestNG. This post is not blaming on anything. It’s just pointing out the little stuff I had to do to make my eclipse works with TestNG.

  1. Install TestNG from eclipse marketplace and restart
  2. The @Test annotation has to be on it’s own line of the plugin won’t pick it up
  3. In assertEquals() (and I’m expecting all the others) expected vs actual values are actually exchanged
  4. You have to configure the Output Folder of eclipse to go under $project/target/target-classes or eclipse won’t pick it up.

That’s it for now.

 

Advertisements

weekly links 2011-06

Hackers penetrated Nasdaq’s network

Why go with RichFaces

Android Google Maps Tutorial

Using Java 6 processors in Eclipse

Next level of Don’t Repeat Yourself(DRY) principle

Java FX 2.0 – The Installation, Doc and Launch Experience – A Smoke Test

Linux vulnerable to Windows-style autorun exploits and fixed.

Dependency Injection Performance in Java EE 6: Dependent (easy) vs ApplicationScoped (“optimized”)

weekly links 2010-48

It’s been a long time I’m not posting but just changed job and relocated abroad, so no time for the blog.

SocialAuth – Java Library for seamless authentication for oAuth and OpenID providers

Eclipse Makes Available New Release of Eclipse Virgo

Using «Federated Login for Google Account Users» in your application

Introducing CQ 5.4, an early sneak-peek.

The way we write software these days

Why Java is being used for high-performance computing

Goodbye SOAP – Welcome JSON REST

Being bad to your customers is bad for business

Oracle’s Reply to Google’s Answer with Counterclaims

A Closer Look at JUnit Categories

Weekly Links 2010-41

Ok this week I didn’t have much time for reading the net, however here are some interesting links

5 things you didn’t know about … Apache Maven

La libertà non ha prezzo: come liberarsi di GMail (Italian)

Announcing Amino, a new UI toolkit for Desktop Java

Oracle and IBM Collaborate to Accelerate Java Innovation Through OpenJDK

Oracle’s strategy is now clear

IBM and Oracle to Collaborate on OpenJDK

Peace breaks out?!?

Maven Dependecy JAR Configuration

Use JavaFX to quickly create applications

How free is the OpenJDK?

Mockito – Pros, Cons, and Best Practices

Weekly links 2010-38

REST application programming

Writing your first active energy manager application using REST

Sending delayed JMS Messages

The fastest ways to open editors in Eclipse using the keyboard

Swing 2.0 is Coming

The biggest announcement – and the biggest surprise for many – of JavaOne 2010 was certainly Oracle’s new plans for JavaFX 2.0… or, should we say, Swing 2.0?

JBoss, eclipse and port bindings

please close the door

via Flickr by Aeioux

Starting JBoss (5.1.x) from eclipse (3.5.x) it could happen that you get an exception like the following:

15:26:51,530 ERROR [Naming] Could not start on port 1099
java.net.BindException: Address already in use: JVM_Bind
 at java.net.PlainSocketImpl.socketBind(Native Method)
 at java.net.PlainSocketImpl.bind(Unknown Source)
 at java.net.ServerSocket.bind(Unknown Source)
 at java.net.ServerSocket.<init>(Unknown Source)
 at javax.net.DefaultServerSocketFactory.createServerSocket(Unknown Source)
 at org.jnp.server.Main.initBootstrapListener(Main.java:480)
 at org.jnp.server.Main.start(Main.java:427)
 ...

It’s because you have a port already in use. In this case it the port used for Naming service. While changing port from the eclipse editor didn’t work, you can (after stopping the server), open the file

$JBOSS_HOME/server/$PROFILE/conf/bindingservice.beans/META-INF/bindings-jboss-beans.xml

search for the desired port (in this case 1099) and then change it to a new value (in my case 1199 was free).

<!-- Naming Service -->
 <bean>
 <property name="serviceName">jboss:service=Naming</property>
 <property name="bindingName">Port</property>
 <property name="port">1199</property>
 <property name="description">The listening socket for the Naming service</property>
 </bean>

save and start the server.