Exemple #1
0
class BasicTest(EmersonFeatureTest):
    '''Most basic test with Emerson, creating an object and then shutting it down immediately.'''
    duration = 25
    entities = [
        Entity(script_type="js",
               script_contents="system.import('basicPresence.em');")
    ]
Exemple #2
0
class UserEventTest(EmersonFeatureTest):
    after = [BasicTest]
    entities = [
        Entity(script_type="js",
               script_contents="system.import('userEventTest.em');")
    ]
    touches = ['system.event']
Exemple #3
0
class HttpTest(EmersonFeatureTest):
    after = [BasicTest]
    entities = [
        Entity(script_type="js",
               script_contents="system.import('httpTest.em');")
    ]
    touches = ['http', 'timeout']
    duration = 35
Exemple #4
0
class TimeoutTest(EmersonFeatureTest):
    after = [BasicTest]
    entities = [
        Entity(script_type="js",
               script_contents="system.import('timeoutTest.em');")
    ]
    touches = ['timeout', 'self', 'onPresenceConnected', 'Date']
    duration = 105
Exemple #5
0
class ConnectionLoadTest(EmersonFeatureTest):
    after = [PresenceEventsTest]
    entities = [
        Entity(script_type="js",
               script_contents="system.import('connectionLoadTest.em');")
    ]
    touches = ['onPresenceConnected', 'onPresenceDisconnected']
    duration = 95
Exemple #6
0
class ProximityAddedTest(EmersonFeatureTest):
    after = [TimeoutTest, CreatePresenceTest]

    entities = [
        Entity(pos_x=10, pos_y=0, pos_z=0, solid_angle=100),
        Entity(script_type="js",
               script_contents="system.import('proximityAdded.em');",
               pos_x=0,
               pos_y=0,
               pos_z=0,
               solid_angle=100)
    ]

    touches = [
        'onProxAdded', 'setQueryAngle', 'setVelocity', 'createPresence',
        'getProxSet', 'timeout', 'onPresenceConnected'
    ]
    duration = 30
    needs_hup = True
Exemple #7
0
class SelfTest(EmersonFeatureTest):
    after = [
        TimeoutTest, HttpTest, StorageTest, PresenceEventsTest, MessagingTest
    ]
    entities = [
        Entity(script_type="js",
               script_contents="system.import('selfTest.em');")
    ]
    touches = ['system.self']
    duration = 65
Exemple #8
0
class PresenceEventsTest(EmersonFeatureTest):
    after = [TimeoutTest]
    entities = [
        Entity(script_type="js",
               script_contents="system.import('presenceEventsTest.em');")
    ]
    touches = [
        'system.createPresence', 'system.onPresenceConnected',
        'system.onPresenceDisconnected'
    ]
    duration = 15
Exemple #9
0
class MessagingTest(EmersonFeatureTest):
    after = [PresenceEventsTest]
    entities = [
        Entity(script_type="js",
               script_contents="system.import('messagingTest.em');")
    ]
    touches = [
        'onPresenceConnected', 'message syntax', 'createPresence',
        'system.presences', 'serialization', 'deserialization', 'makeReply'
    ]
    duration = 20
Exemple #10
0
class SandboxTest(EmersonFeatureTest):
    after = [PresenceEventsTest]
    entities = [
        Entity(script_type="js",
               script_contents="system.import('sandboxTest.em');")
    ]
    touches = [
        'onPresenceConnected', 'capabilities', 'sandbox', 'timeout',
        'killEntity'
    ]
    duration = 15
Exemple #11
0
class StorageTest(EmersonFeatureTest):
    after = [TimeoutTest, SerializationTest]
    entities = [
        Entity(script_type="js",
               script_contents="system.import('storageTest.em');")
    ]
    touches = [
        'storageBeginTransaction', 'storageCommit', 'storageErase',
        'storageRead', 'storageWrite', 'serialization', 'timeout', 'killEntity'
    ]
    duration = 15
Exemple #12
0
class SerializationTest(EmersonFeatureTest):
    #serializationTest: tests objects, arrays, and functions serialized.  does not test certain special objects (presences, visibles, etc.).
    after = [BasicTest]
    entities = [
        Entity(script_type="js",
               script_contents="system.import('serializationTest.em');")
    ]
    touches = [
        'system.onPresenceConnected', 'serialize', 'deserialize', 'disconnect'
    ]
    duration = 15
Exemple #13
0
class CSVFeatureTest(EmersonFeatureTest):
    after = [PresenceEventsTest]
    disabled = True  # Currently fails and not required

    # should load same script on two entities.
    _eci = Entity(script_type="js",
                  script_contents="system.import('featureObjectTest.em');")
    entities = [_eci, _eci]
    touches = [
        'onPresenceConnected', 'message syntax', 'featureObject',
        'serialization', 'deserialization', 'makeReply'
    ]
    duration = 25
Exemple #14
0
class CreatePresenceTest(EmersonFeatureTest):
    after = [TimeoutTest]
    entities = [
        Entity(script_type="js",
               script_contents="system.import('createPresenceTest.em');",
               pos_x=20,
               pos_y=0,
               pos_z=0)
    ]
    touches = [
        'createPresence', 'onCreatePresence', 'vector and quat syntax',
        'timeout', 'system.presences'
    ],
    duration = 55