Posts Tagged unit test
I arrived on evening before just in time for the life cooking event and later at the bar to meet lot of the people I already know and some new too.
The morning begins with a short introduction to the format of a barcamp.
As warm up Jens Schauder starts with an talk about clean code. He begins to compare what the lack of hygiene for Middle Ages mean and the statement that we are in the IT Middle ages. In extreme cases not tested and not understandable software can kills people! So the task for every day is “write an test” and refactor the code to clean code.
Then the barcamp planning starts. In short time three slots are filled up and the really barcamp starts.
Influenced by the starting talk next there was a session related to clean code and how to implement the related processes. You should teach a little bit of the theory behind it. It is essential to decide all rules with the whole team and review the continuous use of it. If the rules are not followed, then first you should ask why this happens and listen for the reasons. Jens Schauder recommends here these books. Maybe you have to adjust the rules to convince all developers. But in extreme cases of deny any of the decided rules you should escalate and delegate this to the responsible manager.
Next session was about how to test heterogeneous applications, especially SQL, PL/SQL and Forms but others too. I mentioned here two possible strategies, which both has it’s tradeoffs:
- End to end testing with expensive Tools, which provides all the required technology plugins, eg.
- Technology testing and mocking the behavior of interfaces to other technologies, you have to learn all off this and provide the infrastructure for it.
I noticed here that testing is mainly seen as to check the contract between developer and customer, sometimes useful for regression test but seldom as required for changing or refactoring the code. The participants seems to be overwhelmed by the amount of tools and effort to do automatic testing. Yes – there is a lot to do in advance, which pays off later.
In the next break I get a shortcut for actual requirement for forms change to implement some kind of SSO without additional servers. I get some nice hints and have now to check, if one of this is successful. This are the advantages of networking here.
The we discussed about Alternatives to Oracle Reports. Seems that it depends on your requirements, which tool to choose. Please do an value analysis here. So if you need pixel exact layout or want not pay much money Oracle Business Intelligence Publisher will not your friend. If you search for an active community maybe you should not choose Eclipse BIRT or at least use the commercial version from Actuate. But both of these and Jasper Reports are used from present participants. Further alternatives seem to be SAP Chrystal Reports and Pentaho. And don’t forget to test exotic features like widows and orphans!
After a coffee break we discussed the future of Oracle ADF. The punchline here was: ADF is not dead, but JDeveloper is very buggy. None of the participants does really miss any bit feature, but most struggles with the IDE. It seems, that the problems are bigger, when you work on windows. Maybe some of the product managers should be forced to worked again with windows to see our problems. I have articulated there 2 problems with the ADF community. I we try to raise the acceptance we should not try to extend the focus of the activities to alternative technologies as MAF or JET. Second we should not self call ADF into question on every conference, we should leave this part to the fans of other technologies.
The last session again turns around automatic testing of PL/SQL, some repeating to the described session above.
In closing session most of the participants said, that they want to come back next year. Maybe it is better to put some fixed sessions or workshops, as this is easier to describe to the bosses as “I will go this event, but it is not clear, what will happens there.”
I have learned not so much new things this year, but I attend these time more the known to me technologies. But I get the confirmation, that most of the things we do or plan do to are on the right track.
Unfortunately I observed some people in the sessions, which comes only to search for finding confirmations to reject for itself, what at least the initiator of the topic want to do.
You find more informations in Twitter
This was my second day:
Michael Tamm (optivo GmbH): Feature Toggles on Steroids
Very good summary off all topic’s covering feature toggles. Wish I had this summary 2 years before, were we have evaluated this. Unfortunately furthermore no solutions for declarative frameworks like Oracle ADF with it’s wizards and xml configurations, which later generated code. Ironic answer to my question: “Don’t use frameworks – use Java”
Alexander Casall (Saxonia Systems AG): User Experience for techies
Now comes someting completely different. As least I had expected. No techniques etc.. There are really german standards “Ergonomics of human-system interaction” in ISO 9241 – 110 (Dialogue principles) and ISO 9241 – 210 (Ergonomics of human-system interaction). I have to read this, if it really would help in development, or the presenter interprets this on its own. Nice and surprising presentation.
Adam Gowdiak (Security Explorations): Java (in)security (Keynote)
The presenter is really angry about Oracle and co. and the security in Java. Nevertheless it seems he has specialized only on this topic and earn this money on this. So I doesn’t know, if somebody or another product is better. What about security in OpenJDK? And what are now my alternatives? A little depressing keynote.
Lars Röwekamp (open knowledge GmbH): Courage to professionalism
I don’t know, what I had expected here, but this was a nice surprise too. The talk was about to find a common language between customer, analyst, developer and other roles. The patterns “Rich Entities” and “Value Objects” helps to find a way out of the helper, util and manager class hell and seems to improve the readability of the code for all stakeholders. But how will this fit in declarative Frameworks like Oracle ADF and it’s generated classes? Have to think about it. Very good speaker!
Unfortunately the worst presentation comes from Oracle itself. To be fair: this presentation should be held by Bruno Borges, which was prevented to come to Javaland. Tip: Never hold a presentation, which is created by another person, if you don’t know, what he know about the subject. But I’m not sure if I had understood more, if Bruno had held the presentation. I didn’t find a red thread in the slides. And I must add, I didn’t really find an alternative presentation in this time slot.
Alexander Heusingfeld, Tammo van Lessen (innoQ Deutschland GmbH): When Microservices Meet Real-World Projects: Lessons Learned
Interesting presentation but the topic was missed. This had little to do with Microservice, more what a consultant or any person has to learn on his way from Junior to Senior: communicate, communicate, communicate. Especially when you want to change something.
Stephan Kaps (Bundesversicherungsamt): Flyway vs. LiquiBase – Battle of the database migration tools
I wanted to do this comparison several times before, but had never enough time. Now I’m relative sure that I will start with Liquibase in my next private project before I develop the application. This was the subjective winner of the battle too. I’m overwhelmed by the mass of features of both tools. Very good summary!
This was a nice workshop to plan the application and technical architecture of a given small set of requirements. Result for me: the many participants from a lot of other companies comes to very similar architecture depending on the assumption they made. In real life you have to communicate again and again with your stakeholders to get answered all of the questions and get quick feedback from them. I have urgently to refresh my knowledge of tools for UML diagramming and graphical presentations. And for structured proceeding maybe I should look for TOGAF training?
This was inspiring conference, which gives me a lot of fresh ideas and reminders for some spilled goals for my private and company projects. I think we’ll see us next year!
The location in Phantasierend Brühl near cologne was very fine. Unfortunately the conference rooms had not enough space this year so for some presentation you have to go to 2 rooms outside of the parc. Additionally it is not understandable, why there is not wlan for such a conference.
This was my first day:
Why I don’t record a test with all information of my page objects, eliminate all variable parts until it is stable and reproducible and define this a my basic truth. If a code change break this test I check the problems, if these were expected or not. Good idea but – how many data created this and how long does it take to compare all this with previous successful run. I hope this new startup will give us effective tools for this paradigm.
When I can trust the Profiler, what are the basics of it and how can I ensure that the right data are available for it. Which traps exist, when instrumenting for tracing and logging. Nice insights, but I’m sure I have to reread the presentation to fully understand.
Exhibition Hall after lunch
Played around with a Jenkins docker instance and the new Pipeline Plugin (formerly named Workflow Plugin) at the Cloudbees booth. I had a nice short talk with Bernhard Cygan about some other Jenkins topics.
Tobias Kraft, Ralf Müller (exensio GmbH): Spock and Geb: Clear and comprehensible tests
This is an interesting combination of frameworks for human readable behavior tests. I’m not sure if it is really enterprise ready (do you use version 0.x?). Will this work with Oracle ADF development too? Have to check this as next opportunity.
Sven Ruppert (Macros Reply): Practical mutation testing
This seems to be the long searched key to find the right tests on the corner cases of our applications. I have mandatory to prove the mentioned PIT framework Very charismatic and tough presenter.
Roel Spilker (TOPdesk), Reinier Zwitserloot (medipc.nl): Lombok: The Boilerplate Buster. It’s a Kind of Magic!
Is this the way to hide generated and framework required code, like standard getters and setters, from the really interesting code, which implements my requirements? It is implemented as a java compiler plugin. Have to check immediately, if this will work with Oracle JDeveloper too. In Eclipse the structure shows the code of generated class, which contains the generated boilerplates via the lombok framework annotations. And what changes are required to fulfill now my static code analysis rules which work on the source code. Additional this was a very entertaining presentation.
Bert Jan Schrijver (JPoint): Continuous Performance: Automated Load Testing with Gatling
As our PoC of JMeter was not really satisfying especially for maintenance of test cases and the load testing should not cost anything at least at the moment, we should definitely this opensource tool a try. Especially the combination of the recorder and the presenter converter scripts to java looks promising. Maybe we could reuse the page object locators from our Selenium tests?
Hubert Klein Ikkink (JDriven): Writing Documentation with Asciidoctor Is Awesome
Focus on content instead of formatting in your documentation! With this tool it seem to be possible to really versioning and therefore to diff your documentation between commits. And still you can generate via templates modern output formats e.g. like HTML 5 or PDF. With a clever combination of features you can annotate your code with markers, to reuse this actual code between this markers in your documentation. And via ASCII art you can generate simple diagrams too. I will absolutely try this on my private projects soon.
Community Hall – Meet the libs
The motto was: show me your favorite opensource lib and I show your mine:
Sven Ruppert again – Proxybuilder: Change the behavior of deep code for different purposes of CDI eg. Metrics, Logging or testing. Maybe interesting for my future tests.
Roland Huß – Jolokia: JMX Bean access via JSON over HTTP, interesting but don’t know if I ever need this
? – Asciidoctor again: Jump additional over some of tool integrations
? – Keycloak: If I ever need a SSO or IDM solution for my private projects this will the first citizen in my tool chain.
? – Wildfly swarm: Interesting but actually I did not touch JBoss or Wildfly in my projects.
Generally very good food, I had not expected this here. At dinner I meet at my desk with some staff of canoo, which set up the voting machines at Javaland too. Nice and diverting talk, thank you guys!
I have presented today on DOAG Development 2014 in Dusseldorf. For all non DOAG members – you can find the german presentation on slideshare too.
If you speak german and you are interested in quality assurance for your ADF projects you should come and attend my presentation at DOAG Development on 06/04/2014 in Dusseldorf.
I will show you, how you can implement in the JDeveloper IDE and in Continous Integration server Jenkins:
- static code analysis with PMD, FindBugs and Checkstyle
- Commit tests with JUnit, Mockito and Powermock for Mockito
- Code coverage for commit tests with JaCoCo
- Acceptance tests with JUnit and Selenium