Hi Janandith,

On Wed, May 28, 2008 at 9:03 PM, janandith jayawardena
<[EMAIL PROTECTED]> wrote:
> ...I would like to write test cases (Automated tests) for the scala module as 
> I
> code....

The best might be to study the scripting/javascript module, which
implements the Rhino-based javascript engine for Sling.

That module contains test code in src/test, which can be executed by
running "mvn test" in the scripting/javascript source code folder.
Most of our tests are written in JUnit 3 style, but the JUnit 4
libraries are used when testing, so feel free to use the improved
JUnit 4 features if needed.

The tests are also automatically executed when running "mvn install",
and if they fail the module is not installed in the Maven repository.
That can be disabled by using "-Dmaven.test.skip=true" as an option
for mvn.

To get started, it might be interesting for your to create a dummy
scripting engine, that does not really execute scripts but only
outputs their contents, for example. That would show you how to "wire"
a scripting engine in Sling, and take this part out of the equation
for implementing the actual Scala engine. This shouldn't be too hard
to do based on the scripting/javascript example, and we could use that
code as documentation for how to integrate new scripting engines.

-Bertrand

Reply via email to