Thursday, February 28, 2013

I realized it had been more than 2 weeks since I posted on my blog. Our originally project was to test the scalability of Errai. I first learned junit testing with an application my mentor wrote junit-4-prefrunner which I have discussed in earlier posts. My mentor had also built a testing application with an user interface.This application used time interval, message multiplier, and number of bytes to get the number of bytes that reached the server. He wanted the average, max, and min of the speed it took messages/bytes and bytes/message it took to reached the server. I modeled it using junit-4-prefrunner.

 import java.io.BufferedWriter;
 import java.io.File;
 import java.io.FileWriter;
 import java.io.IOException;
 import java.util.concurrent.ExecutorService;
 import java.util.concurrent.Executors;
 import java.util.concurrent.TimeUnit;

 import org.jboss.perfrunner.Axis;
 import org.jboss.perfrunner.PerfRunner;
 import org.jboss.perfrunner.Varying;
 import org.junit.Test;
 import org.junit.runner.RunWith;

@RunWith(PerfRunner.class)

public class PerfTest{
    double max = Double.MIN_VALUE;
    double min = Double.MAX_VALUE;
    @Test
    public void messageSentToServer(
            @Varying(name="messages", axis=axis.X,from=10,to=100,step = 10) int numberOfMessages,
            @Varying (name = "Load", axis=axis.SERIES, from = 1000, to = 10000, step= 1000)int bytesPerMessage)throws InterruptedException{
        String content = "0";   
        FileWriter fstream = new FileWriter("out.txt");  
        BufferedWriter out = new BufferedWriter(fstream);
        for(int num=0; num < numberOfMessages; num++){ 
  
        out.write(content);
        }
        out.close();
      
        }
   
    }

My mentor thought I was just learning more about junit-4-perfrunner. He also wanted a test harness with an user interface similar to his other application. He said he doesn't know how to do this. That it was just exploratory. It meant learning GWT and Errai-bus really well. After spending a lot of time on this we decided to switch projects. I am working on allowing any class that implements IsWidget to be annotated with @Page.We'd like to be able to more easily implement MVP using Errai-UI Navigation. Having a Presenter implement IsWidget annotated as @Page would allow us to do that. This will still mean learning GWT better but the project also uses CSS. It also uses Errai- UI Navigation that starting in version 2.1, Errai offered a system for creating applications that have multiple bookmarkable pages. This navigation system has the following features:
  • Declarative, statically-analyzable configuration of pages and links
    • Compile time referential safety (i.e. “no broken links”)
    • Generates a storyboard of the application’s navigation flow at compile time
  • Decentralized configuration
    • Create a new page by creating a new annotated class. No need to edit a second file.
    • Make navigational changes in the natural place in the code.
  • Integrates cleanly with Errai UI templates, but also works well with other view technologies.
  • Builds on Errai IoC & CDI

After making this decision to change projects my work was interrupted. Because my legs were still weak from rhabomeolysis I fell getting into my car and fractured a bone in my ankle. Because I can't take care of myself I am presently in a rehab hospital. I am having to spend late morning and early afternoon in therapy. I brought my computer to the hospital so I can still work late afternoons, evenings, and some times early in the morning. I am always interrupted by doctors, nurses, case managers, X-ray technicians, and people to take my vital signs. Hopefully I'll be able to work more on the weekend. I don't know how long I'll have to stay here.

Friday, February 8, 2013

I need one of the marketing interns to market junit-4-perfrunner so more people are using it. That way I would have more people working with it than me and my mentor and I could get some help writing test cases. My mentor has been gone this week so I have been on my own. Testing errai is a lot more difficult than what I have done already. I was discussing some of the problems I was having with devchix. Their immediate response was to use jmeter since they had not heard of junit-4-perfrunner. Thus brings up the problem of having a new superior product but nobody knows about it. It gets lost in github and the internet. My mentor released junit-4-perfrunner last year. jmeter has been around longer and has established itself. Once people have a product they think works they are less likely to change. If the marketing interns have any tips I would be happy to hear them.