1.4.0 to become 2.0.0 Release

While addign new features to 1.4.0 I started to get concerns that the code base was starting to become very monolithic, all the logic for Fitnium is contained with a single 5000+ class BaseFitniumFixture.java. Some of the new features are starting to add more complex logic to the code, I therefore started looking at options. This has led to a major refactor of the code base. Each suite of API Button, Attribute, Cookie, File etc all now exist in their own classes. BaseFitniumFixture is now pass through or proxy to these classes.

Fitnium being a DoFixture requires all the methods to be in one class but now have a structure like

class BaseFitniumFixture extends DoFixture {

:

public boolean isElementVisible ( String locator ) {

return FitniumElementAPI.isElementVisible ( this, locator );

}

}

class FitniumElementAPI extends FitniumAPI {

:

public boolean isElementVisible ( BaseFitniumFixture fixture, String locator ) {

// Convert any variables to values

// Apply Regular expression logic

// Real logic for checking element for visibility

}

}

This means I can now apply tests to whole suites of API and makes managing the code base much¬† more easier as you don’t have to scroll up and down a 5000 line class for logic

Advertisements

4 Responses to “1.4.0 to become 2.0.0 Release”

  1. william Says:

    I’m looking for documentation on how to reuse the selenium code already done in Fitnium or Fitenesse. Any help appreciated.

  2. keiffster Says:

    What is you are after. Do you want to use the Selenium RC code I used in Fitnium to write the DSL ?, if so you can download this from http://seleniumhq.org/download/ Just click the Selenium RC download link and unzip the file you get. All the documentation and help is in there

    If you want the source code for Fitnium, just download the latest version from http://www.magneticreason.com/tools/fitnium/downloads.html you’ll find a source.zip in the package and all the code is in there

    Does this answer your question

  3. william Says:

    Thanks for the answer. My question is not clear, sorry for that.
    We have already developed some selenium code. The question is how can we reuse it within Fitness or with Fitnium.
    Using Fitnium do we have to throw away all work done before and rebuilt it using the DSL?

    Thank you

    , that’s wwell it is a more general question.

  4. keiffster Says:

    OK, think I understand now. Do you mean you have written tests in Selenium RC ( Java, Python, Ruby etc ), so I’m guessing you have a suite of Java classes in possibly JUnit of something similar.

    There is not an easy way to convert RC code to Selenium Tests. However its a questions I get asked alot by users of Fitnium and the solution I have generally come to is “why throw anything away”

    Fitnium and Selenium RC are basically 2 ways of running Selenium tests. There is nothing wrong with you keeping the RC code as one suite of tests, and developing a suite of Fitnium tests. You could then run both tests as 2 Hudson/Cruise jobs.

    Remember Fitnium was built to allow non programming testers to write detailed Fitnesse + Selenium tests. It is aimed at testers who typically have worked in a manual testing environment Quality Centre/Test Director type of environment.

    Fitnium is good ;-), but not that good and on many of the teams I work with, a small percentage of tests are still developed in pure RC

    Keith

    PS. Would you be interested in Beta testing 1.4.0 ?

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


%d bloggers like this: