예제 #1
0
class Task(BaseTask):
    '''
    Start a SELENIUM server before the tests.
    '''

    # Add option for configuration file only if not set by the driver task.
    option_list = [] if 'selenose.tasks.selenium_driver' in getattr(
        settings, 'JENKINS_TASKS', []) else [make_config_option()]

    def __init__(self, test_labels, options):
        '''
        Store the server.
        '''
        # Call super
        super(Task, self).__init__(test_labels, options)
        # Create the server
        self.server = Server(ServerConfig(all_config_files(options)))

    def setup_test_environment(self, **kwargs):
        '''
        Start the SELENIUM server.
        '''
        self.server.start()

    def teardown_test_environment(self, **kwargs):
        '''
        Stop the SELENIUM server.
        '''
        self.server.stop()
예제 #2
0
class SeleniumServerPlugin(plugins.Plugin):
    '''Start a Selenium server before running tests.'''
    
    name = 'selenium-server'

    def configure(self, options, conf):
        '''
        Configure the plug-in.
        '''
        # Call super
        super(SeleniumServerPlugin, self).configure(options, conf)
        # Initialize the server
        self.server = Server(ServerConfig(all_config_files(options, conf)))

    def begin(self):
        '''
        Start the SELENIUM server.
        '''
        self.server.start()
    
    def finalize(self, result):
        '''
        Stop the SELENIUM server.
        '''
        self.server.stop()
예제 #3
0
class SeleniumServerPlugin(plugins.Plugin):
    '''Start a Selenium server before running tests.'''

    name = 'selenium-server'

    def configure(self, options, conf):
        '''
        Configure the plug-in.
        '''
        # Call super
        super(SeleniumServerPlugin, self).configure(options, conf)
        # Initialize the server
        self.server = Server(ServerConfig(all_config_files(options, conf)))

    def begin(self):
        '''
        Start the SELENIUM server.
        '''
        self.server.start()

    def finalize(self, result):
        '''
        Stop the SELENIUM server.
        '''
        self.server.stop()
예제 #4
0
class Task(BaseTask):
    '''
    Start a SELENIUM server before the tests.
    '''

    # Add option for configuration file only if not set by the driver task.
    option_list = [] if 'selenose.tasks.selenium_driver' in getattr(settings, 'JENKINS_TASKS', []) else [ make_config_option() ]

    def __init__(self, test_labels, options):
        '''
        Store the server.
        '''
        # Call super
        super(Task, self).__init__(test_labels, options)
        # Create the server
        self.server = Server(ServerConfig(all_config_files(options)))
        
    def setup_test_environment(self, **kwargs):
        '''
        Start the SELENIUM server.
        '''
        self.server.start()
    
    def teardown_test_environment(self, **kwargs):
        '''
        Stop the SELENIUM server.
        '''
        self.server.stop()
예제 #5
0
 def __init__(self, test_labels, options):
     '''
     Store the server.
     '''
     # Call super
     super(Task, self).__init__(test_labels, options)
     # Create the server
     self.server = Server(ServerConfig(all_config_files(options)))
예제 #6
0
 def configure(self, options, conf):
     '''
     Configure the plug-in.
     '''
     # Call super
     super(SeleniumServerPlugin, self).configure(options, conf)
     # Initialize the server
     self.server = Server(ServerConfig(all_config_files(options, conf)))
예제 #7
0
 def configure(self, options, conf):
     '''
     Configure the plug-in.
     '''
     # Call super
     super(SeleniumServerPlugin, self).configure(options, conf)
     # Initialize the server
     self.server = Server(ServerConfig(all_config_files(options, conf)))
예제 #8
0
 def __init__(self, test_labels, options):
     '''
     Store the server.
     '''
     # Call super
     super(Task, self).__init__(test_labels, options)
     # Create the server
     self.server = Server(ServerConfig(all_config_files(options)))
예제 #9
0
def get_server(**kwargs):
    '''
    Get a server.
    '''
    return Server(get_server_config(**kwargs))