[otj-users] Strange problem in very simple example / track id 137

Olaf Otto olaf at x100.de
Sun Jul 13 22:29:29 CEST 2008


Hi Stephan,

Thank you anyway!
In order to use some test semantics it is also possible to directly use 
a Junit test case launcher from a main method.
This works for OT/J and might be an acceptable workaround if there is 
just a single testclass.

Kind regards,
Olaf

--- snipp ---
package [your.package.goes.here]

import org.junit.Test;
import org.junit.experimental.results.PrintableResult;
import org.junit.runner.JUnitCore;
import org.junit.runner.Result;

public class OtJunitTest {
    @Test
    public void test() {
       ...
    }
   
    public static void main(String[] args) throws Exception {
        Result r = JUnitCore.runClasses(OtPersistenceTest.class);
        PrintableResult pr = new PrintableResult(r);
        System.out.println(pr.toString());
    }
}

--- /snipp ---

Disclaimer: I have not tried that with @Before... etc. yet.




Stephan Herrmann wrote:
> Hi,
>
> Sorry, apperently I provided the wrong version of information!
> The given arguments enable the Eclipse platform to execute OT/J code,
> however, it seems you have a plain JUnit suite (no self-hosting of Eclipse)?
> I will include some OT/J support for JUnit in the next build.
>
>   
>> btw: I would be interested in running ot-applications on the command
>> line - how could that be achieved?
>>     
> This question is actually simpler to answer: see 
> 	http://trac.objectteams.org/ot/wiki/RunningWithAnt
>
> best,
> Stephan
>
> _______________________________________________
> otj-users mailing list
> otj-users at objectteams.org
> http://www.objectteams.org/cgi-bin/mailman/listinfo/otj-users
>   




More information about the otj-users mailing list