How to write my own STF tests?

This is the typical structure of an STF test. For further information about STF take a look at the STF User Manual.

import static de.fu_berlin.inf.dpp.stf.client.tester.SarosTester.ALICE;
import static de.fu_berlin.inf.dpp.stf.client.tester.SarosTester.BOB;
import static de.fu_berlin.inf.dpp.stf.client.tester.SarosTester.CARL;
import static de.fu_berlin.inf.dpp.stf.client.tester.SarosTester.DAVE;

import org.junit.After;
import org.junit.AfterClass;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Test;

import de.fu_berlin.inf.dpp.stf.client.StfTestCase;
import de.fu_berlin.inf.dpp.stf.client.util.Util;
import de.fu_berlin.inf.dpp.stf.shared.Constants.TypeOfCreateProject;

// Every test-class is an extension of StfTestCase.
public class MyFooBarTest extends StfTestCase {

    @BeforeClass
    public static void selectTesters() throws Exception {
        /*
         * Typically you select the testers you need for the test case using the
         * select() method. In this example we select ALICE and BOB as testers.
         */
        select(ALICE, BOB);
    }

    @Before
    public void runsBeforeEveryTest() throws Exception {
        /*
         * Make sure, that the following tests can use a cleaned saros instance.
         * Here are the most important functions you can use to clean the saros
         * instance.
         */
        closeAllShells();
        closeAllEditors();
        clearWorkspaces();
        resetDefaultAccount();
        leaveSessionHostFirst(ALICE);
        leaveSessionPeersFirst(BOB);
    }

    @After
    public void runsAfterEveryTest() throws Exception {
        /*
         * Clean up your instance for the next tests but beware
         * of closing shells or editors here! The framework creates screenshots
         * so if you close something here, the screenshots may be useless! You
         * can call these functions in the @AfterClass-section
         */
    }

    @AfterClass
    public static void runAfterClass() throws Exception {

    }

    @Test
    public void testNothing() throws Exception {
        /*
         * Tests may not run in the order you write them so be sure that
         * you cleaned up your Eclipse instance.
         */
    }
}