Menu

GettingStarted

Mathieu Durand

The first thing to do with Atomic34 is to create the definition file for the site you want to test. We will create a small demo using Google. All the code is available in the mercurial repository, in the net.sf.atomic34.example project.

In many of my projects I use Apache Ivy to resolve dependencies. If you don't know Ivy, it's a bit like Maven, but only the part about managing dependencies. Inside Eclipse, you can use the IvyDE project to integrate Eclipse with Ivy.

The steps to create a new project with Atomic34 are:

  1. Create a new Java Project in Eclipse
  2. Add an ivy.xml file with dependencies on joda-time, commons-beanutils, commons-codec and org.seleniumhq.selenium
  3. Create a package for your site definition, net.sf.atomic34.example.google in our demo
  4. Create a new source folder named "src-gen", which will hold the generated files
  5. You need to link dependencies for the project to work. I often use Apache Ivy for this (with IvyDE inside Eclipse), but you can use maven also. The dependencies are:
    • org.seleniumhq.selenium / selenium-java (2.4.0+)
    • com.google.guava / guava (r09)
    • joda-time / joda-time (2.0)
  6. There is also a dependency on atomic34 definition library (not available on maven yet) that you can download on this site.
  7. In the package, create a file with the extension .a34 (google.a34)
  8. When asked to add XText nature to the project, answer yes.
  9. Enter some content in the a34 file (see google.a34)
  10. Upon saving, some code will be generated in the src-gen folder based on your definition
  11. Write a jUnit test based on the generated code.

To understand the writing of the a34 file -> [A34File]


Related

Wiki: A34File
Wiki: Home
Wiki: Installation

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.