Sushant Dasgupta
Sushant Dasgupta

Reputation: 1

Unable to run a program as Silk4J test

I was trying to automate an Eclipse-based standalone application. I recorded a script using Silk4J and I am also able to run the script separately.

Under the same package I have created one more .java file which invokes the script. But I am not able to run the .java file as "Silk4j Test". The option is not available.

What changes should I make in order to run the .java file which will eventually run the script?

Upvotes: 0

Views: 609

Answers (1)

Thomas Weller
Thomas Weller

Reputation: 59302

A Silk4J test is actually a JUnit test. Until today I could not find a real difference running a test as Silk4J test or as JUnit test.

If the option "Run as Silk4J test" and "Run as JUnit test" are not available, the most likely reason is that your method is not marked as a JUnit test.

You need the @Test annotation:

import org.junit.Test;
[...]
@Test
public void test()
{
    protected Desktop desktop = new Desktop();
    BaseState baseState = new BaseState();
    baseState.execute(desktop);
    [...]
}

Upvotes: 1

Related Questions