!define TEST_SYSTEM {fit:A} part II 26
In 11/2008 I wrote the first part of this article but I really did not give the background on why I originally asked Bob to add this feature.
So why does FitNesse need to be able to run different parts of suites in different VM’s?
Imagine you are testing services registered on an ESB. That ESB allows deployment of services as EJB’s. There’s something important about that fact. By default, different EJB’s run with their own class loader. You can dig into the EJB spec if you’d like, but there’s roughly a hierarchy of 5 class loaders by the time you get to an executing EJB (can be more, could be less).
Why is this important? If two EJB’s make reference to the “same” JAR file, then each could get loaded by the same or a different class loader. If the JAR file is installed high in the class-loader hierarchy, then they will be loaded by the same class loader instance and therefore will be the same classes.
However, let’s assume that each EJB represents ones service. Furthermore, each EJB makes a reference to some JAR file directly, that is, it is not visible to a hierarchically higher class loader. Then that same JAR file will get loaded twice, once by each class loader (this really happens), and those exact same classes will be considered different.
That’s right, the exact same JAR file loaded by 2 different class loaders are treated as unrelated classes.
In reality, each deployed EJB is “complete” in that in includes the JAR’s it needs to execute. So the “same” jar – same in terms of file contents – exists twice in the system and is loaded by two class loaders.
Now, it gets a little worse. Those two EJB’s work off a “common” data model. Common in that the underlying business objects are common across a set of applications. However, the common data model is a moving target (it’s grown as needed). To manage complexity, not all services are forced to update to the latest version of the common data model at the same time (it’s not really a manageable solution – generally).
So now we have 2 (really several) EJB’s that refer to logically the same JAR but different versions. Luckily, this is no problem because each EJB has its own class loader, so it is OK for 2 EJB’s to refer to different versions of the same logical data model.
How does any of this have anything to do with FitNesse? When FitNesse executes a suite, by default all tests are executed in the same VM with one class loader. So if you have a suite of tests that test different services, each of which might be using a different version of the common data model, then the first service executed loads the common data model, which really isn’t exactly common. This causes tests to fail that would not fail if each text executed with its own class loader.
Rather than deal with writing custom class loaders, Bob instead make it possible to name a VM (see the title for the syntax). By doing this, Bob make it possible to effect a similar environment to that experienced by EJB’s by default.
Do you think you might be yak shaving?
Is FitNesse the right tool to test at the EJB level? (I would use FitNesse for functional testing, not integration testing) Is it a good idea to use a shared but unstable data model? (You have hinted it is not) Should two services that are this separate use the same FitNesse instance? Is the ESB causing more problems than it is solving?
Is the ESB yak shaving? Yes. In this particular case, they were mandated to buy versus build and already had purchased a stack.
Given that constraint, they needed a means to execute suites of tests across components.
I’m getting flashbacks from a talk I gave a few years ago titled “why I hate SOA.” ;-)
I heard that!
much more efficient than writing custom class loaders.
but that all attempts to improve quality would be short lived and followed by a larger drive to decrease quality even further.
I just can’s believe how surprise when i receive my iphone 4. Its so charming and functional! But there’s one thing i don’t satisfy, i don’t like the color. Waiting for the coming white iphone 4 conversion kit.
http://blog.objectmentor.com/articles/2009/03/31/fitnesse-decision-tables-a-tutorial
Thanks for sharing this great post Brett! Just had a look at that first article too (excellent analysis in this follow up posting). Cheers.
Thanks for shareing! I agree with you. The artical improve me so much! I will come here frequently. Would you like to banckup iphone SMS to mac, macBook, macbookPro as .txt files? Now a software iphone SMS to Mac Backup can help you to realize it.
I really like this essay. Thank you for writing it so seriously. I want to recommend it for my friends strongly. iPad ePub Transfer for Mac is a Professional transfer that can transfer the ePub books onto your iPad on Mac and export the iPad ePub to Mac local folder.
@Johannes Brodwall Haha Yes- SOA is an easy thing to hate, it is also hard to read about.
good work.
internette görüntülü olarak okey oyunu oyna, gerçek kisilerle tanis, turnuva heyecanini yasa.
You explain TEST_SYSTEM in a very efficient and unqiue way I must appreciate this post
Have the christian louboutin patent leather pumps is a happy thing. Here have the most complete kinds of christian louboutin leather platform pumps.
hmm ,i’m not sure if this is what i’m looking for but anyway this is interresting and could be useful some day,thanks for taking time to write such cool stuff
useful some day,thanks for taking time to write such cool stuffbeats by dre sale cheap beats by dre
Canada Goose Outlet is Marmot 8000M Parka. The Marmot 8000M Parka is really a waterproof, breathable jacket with 800 fill canada goose jacket feathers. It truly is design and light colored shell is produced for trendy, but uncomplicated, protection from cold temperatures. Reinforced shoulders, elbows and adjustable waist and hem make the Marmot a perfect alternate for skiing and other outdoor sports that want fairly a bit of arm motion. The 8000M Parka weighs three lbs., comes in bonfire and black colours and might be stuffed and stored like a sleeping bag to your convenience.This is one of well-know and prime down jacket brands.Hope our friends like its!Like canada goose womens and Canada Goose Expedition Parka.There are wholesale canada goose.
A man should look for what is, and not for what he thinks should be.
The professional design make you foot more comfortable. Even more tantalizing,this pattern make your legs look as long as you can,it will make you looked more attractive.Moveover,it has reasonable price.If you are a popular woman,do not miss it.
Technical details of Christian Louboutin Velours Scrunch Suede Boots Coffee:
Fashion, delicate, luxurious Christian louboutins shoes on sale, one of its series is Christian Louboutin Tall Boots, is urbanism collocation. This Christian louboutins shoes design makes people new and refreshing. Red soles shoes is personality, your charm will be wonderful performance.
The professional design make you foot more comfortable. Even more tantalizing,this pattern make your legs look as long as you can,it will make you looked more attractive.Moveover,it has reasonable price.If you are a popular woman,do not miss it.
Technical details of Christian Louboutin Velours Scrunch Suede Boots Coffee:
Fashion, delicate, luxurious Christian louboutins shoes on sale, one of its series is Christian Louboutin Tall Boots, is urbanism collocation. This Christian louboutins shoes design makes people new and refreshing. Red soles shoes is personality, your charm will be wonderful performance.
Get to know about C# and C++. In fact, I find there is no much difference between the two. However, If we want to do much better. I need work hard.
Monster beats dre shop preferential DaChouBin! Monster Butterfly, Monster Butterfly,Monster diddy beats ~ ~ ~ all discount in progress!
sdassdasdadsadsasda
Handbags will forever be the ultimate fashion accessory for women of all ages?
http://www.outfitscosplay.com/cosplay-catalog/07-ghost-cosplay Deluxe 07-Ghost Cosplay Costumes for Sale.Find your favorite characters and cosplay outfits from all the popular anime and games.