• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

TeamCity and Databases

 
Ranch Hand
Posts: 98
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Kirill

If my Java or .NET application fronts an RDBMS, is their any support in TeamCity for building the matching Database schema and static data?
 
author
Posts: 18
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Chris,

By the moment, TeamCity doesn't offer any facilities to create various RDBMS data for your builds / tests. Your build should manage this data by itself.
But, if your application can be used with different RDBMS you can setup several TeamCity build agents (with a single server front-end) and setup build configurations to test your project on these different agents.
For instance, we use such approach to run TeamCity's own tests on Mysql and HSQLDB RDBMS.
Please note, TeamCity uses build grid approach, when many build agents work with the central server and this server maintains build queue and distributes builds among agents.
[ December 06, 2006: Message edited by: Kirill Maximov ]
 
Chris Hendy
Ranch Hand
Posts: 98
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Kirill,

What kind of tests do you run on your Mysql and HSQLDB RDBMS's ?

Are you using DbUnit?

Are your techniques portable to other databases? (selfish question since my company is exclusively Oracle based).

At the moment our database testing consists of automated functional tests of the entire application, but I would like to try introducing utPLSQL for the database code.

Regards
Chris
 
Kirill Maximov
author
Posts: 18
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Chris,

In fact, we run all the queries which would run in the production mode. Each test verifies some aspect of the system. In the setUp stage we create database schema (using the same code which is executed in production when database is initialized), than we call various methods which fill database with data and perform queries.
By default our tests are run using in-memory HSQLDB, and we have a couple of agents with configured Mysql (to ensure our SQL is valid for different DB).
We also have several performance tests as well, when a large volume of data in database is created before tests are run.
We don't use DBUnit and create appropriate fixtures by calling model methods.
I think we could port TeamCity to Oracle, but we don't have such plans yet.
 
Chris Hendy
Ranch Hand
Posts: 98
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Kirill

Thanks for your answer.

The reason I am polluting a Java forum with database questions is because of the architecture of the application I currently work on.

It originated as Oracle Forms on an Oracle database, with a lot of business logic in database procedures and triggers.

More recently most new development has been carried out in JSP/Servlets/Struts against the common database - the original forms still being used.

The Java code base is in CVS and is built nightly using Ant. The Java Developers mostly use Idea 5 so TeamCity seems a logical next step.

Database schema, code and static data are in CVS, the build script can be automatically generated but running it is a manual task.

Slipping into Martin Luther King mode for a moment - I Have a Dream...

...That the build of Java, Forms and Database can be treated equally. That it can be made completely automatic, with notifications of build failure and test failure for each of the code bases.

I am happy to roll as much of my own code as necessary (totally automatic DB build is the first step I would take), but since developer time is a scarce resource, the more TeamCity can do for me, or the more hooks into TeamCity functionality I can use the better.

So, are there features of TeamCity that we haven't already discussed that might help me in my quest?

Regards
Chris
 
Kirill Maximov
author
Posts: 18
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello Chris,

Unfortunately, TeamCity doesn't support any specifics for databases.

You could use TeamCity the following way:
Setup a project with common CVS codebase for DB, Forms and Java.
Prepare build scripts (Ant?) for each of the configurations.
For the created project setup several build configurations, and setup appropriate build agents, so each configuration could run on a specific build agent with appropriate environment.

In this case, you'll have a single access point for all your builds and single place for notifications configuration.

Hope this helps,
KIR
 
Chris Hendy
Ranch Hand
Posts: 98
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Kirill.

I've looked at the TeamCity demo at

http://www.jetbrains.com/teamcity/documentation/screenshots/overviewTeamCity1.1.html

the notifications of failure and display of the relevant stacktrace are really cool.

In your answer to this topic

https://coderanch.com/t/105173/vc/TeamCity-SubVersion

you talk about TeamCity adding listeners to the build process.

What sort of API to my homegrown build scripts (made into Ant tasks say) would I have to provide for TeamCity to be able to hook its listeners to them?

Can I specify the error log file to display as with the Java stack trace?

Regards
Chris
[ December 08, 2006: Message edited by: Chris Hendy ]
 
Chris Hendy
Ranch Hand
Posts: 98
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Just been trawling through

http://www.jetbrains.com/teamcity/documentation/faq.html

Would I define the error logs / messages from my build/test failure as Build Artifacts?
[ December 08, 2006: Message edited by: Chris Hendy ]
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic