Kristian Aaslund

Greenhorn
+ Follow
since Jul 21, 2011
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
1
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Kristian Aaslund

arnel nicolas wrote:I agree that this is more of a discipline. Maybe you can motivate the team by explaining to them the short term and long term benefit of unit testing. Site good examples if you can. Do pair programming with them and lead by example.


I think working test-driven and writing good unit tests is a mindset, not a discipline. I totally agree on leading by example. Show them how it's done. Show that simple tests may cover a lot of the functionality and prevent regressions. Many developers think that they should test every possibility in every method. That is too time consuming. The TDD mindset will help you identify where a unit test is needed and how much testing is needed. Pair programming also works if at least one of the two has some experience in writing good tests.

arnel nicolas wrote:Or if not, enforce it to the team . What you can do is to require them to have unit test where it make sense as part of your code review process. Then that will become a practice in their day to day activities. Or as previously mentioned, establish a metric regarding code quality to measure if you are improving or not in that aspect and make it as part of your team goal.


I hate enforcement. We should want to follow best practices, not be required to. Demonstrate TDD on a regular basis and focus on simplicity and how to save time. Take time to help developers that struggle with the mindset or technical issues. It is better that all developers gets a little better at writing tests than one guy becoming a supernatural TDD ninja.
If there is a fixed relation between story points and hours, there is absolutely no reason to use both IMO.

We have used story points as a measure for complexity/time relative to the other stories in the product backlog, not for an estimate of how long it will take to finish the story.
During the sprint planning, we estimate how long time we will spend on each story, using hours only.

Be pragmatic. Whatever works for one team may not work at all for other teams.
Also, be sure to remove such uncertainties. If the team doesn't understand what a story point means, agree on a common definition or don't use it at all.

Campbell Ritchie wrote:Does NetBeans really give you a method which adds an ActionListener when you click a button ?



No. That line must have been added manually, and has nothing to do there
12 years ago
I got it working with EclipseLink and H2 by changing to these config parameters:


Now, let's try if it works against an existing test db ;)

Thanks for your help!
I'm trying.
Looks like EclipseLink didn't create the db right. I get "org.h2.jdbc.JdbcSQLException: Table "STATUS" not found" when trying to do a simple select from a unit test.

Here are my config parameters:


I will give derby a try with EclipseLink too..
Then I need to give that a try.

Can you post your presistence.xml with your EclipseLink config?
Also, what version of EclipseLink are you using?

Thanks!
Thanks. Happy to visit the Ranch

TopLink generated this create sql:
The live SQL Server DB uses this:
The entity class looks like this:
I'm currently trying to establish a test harness for a legacy system backed by SQL Server. I want to use a lightweight in-memory DB to be able to run unit tests quickly and without messing with an entire server-based test DB. I am creating different maven profiles for development, test and production. The legacy system uses TopLink and standard JPA as the ORM-tool.

The problem is that I can't get any of the in-memory DBs to support GenerationType.IDENTITY for the ID column. This is used without problems in the live SQL Server DB.

Both HSQLDB and H2 fails with IDENTITY. Error:
AUTO works fine for H2, but not when switching back to SQL Server again.
I have tried different implementations of the H2Platform as suggested here with no luck.

Apache Derby seems to have a limit of 18 characters for naming constraints during creation of the DB. This lead to a lot of duplicate constraint names, so no go there..

All DBs are latest version available in Maven Central July 21 2011.

Does anyone have tips for where to go next?
- Will switching to Hibernate or EclipseLink help?
- Are there other alternatives I should try?