コード例 #1
0
def main():
    """
    Main function
    Prints and introduction statement and starts the comparison engine
    """
    # Print the introduction message
    print("\n####################################################################\n"
          "Continuous Delivery Performance Promotion Tool\n"
          "CDK Global, LLC\n"
          "####################################################################\n")

    arguments = ArgumentEngine().process_arguments()

    # Grab the configuration information
    configengine = ConfigEngine("config.json", arguments['lr'], arguments['ll'], arguments['blzkey'], arguments['blztest'],
                                arguments['appduser'], arguments['appdpass'], arguments['appdapp'],
                                arguments['wpgtkey'])
    config_data = configengine.process_config()

    # Grab the performance data
    dataengine = DataEngine()
    perf_data = dataengine.get_data(config_data)

    # Begin evaluating the build
    comparisonengine = ComparisonEngine()
    evaluation = comparisonengine.process_data(config_data, perf_data)

    # Output the data
    outputengine = OutputEngine()
    outputengine.release_judgement(evaluation, arguments['oc'], config_data["elastic_kibana"])

    if __name__ == '__main__':
        main()
コード例 #2
0
    def test_no_appdynamics_connection(self):
        # Grab the configuration information
        configengine = ConfigEngine("./test_configs/config_test1.json", None, None, None, None, None, None, None, None)
        config_data = configengine.process_config()

        # Grab the performance data
        dataengine = DataEngine()

        # Check for a system exit call
        with self.assertRaises(SystemExit) as cm:
            dataengine.get_data(config_data)

        # Make sure that sys.exit(1) is called
        self.assertEqual(cm.exception.code, 1)
コード例 #3
0
    def test_no_appdynamics_connection(self):
        # Grab the configuration information
        configengine = ConfigEngine("./test_configs/config_test1.json", None,
                                    None, None, None, None, None, None, None)
        config_data = configengine.process_config()

        # Grab the performance data
        dataengine = DataEngine()

        # Check for a system exit call
        with self.assertRaises(SystemExit) as cm:
            dataengine.get_data(config_data)

        # Make sure that sys.exit(1) is called
        self.assertEqual(cm.exception.code, 1)
コード例 #4
0
def main():
    """
    Main function
    Prints and introduction statement and starts the comparison engine
    """
    # Print the introduction message
    print(
        "\n####################################################################\n"
        "Continuous Delivery Performance Promotion Tool\n"
        "CDK Global, LLC\n"
        "####################################################################\n"
    )

    arguments = ArgumentEngine().process_arguments()

    # Grab the configuration information
    configengine = ConfigEngine("config.json", arguments['lr'],
                                arguments['ll'], arguments['blzkey'],
                                arguments['blztest'], arguments['appduser'],
                                arguments['appdpass'], arguments['appdapp'],
                                arguments['wpgtkey'])
    config_data = configengine.process_config()

    # Grab the performance data
    dataengine = DataEngine()
    perf_data = dataengine.get_data(config_data)

    # Begin evaluating the build
    comparisonengine = ComparisonEngine()
    evaluation = comparisonengine.process_data(config_data, perf_data)

    # Output the data
    outputengine = OutputEngine()
    outputengine.release_judgement(evaluation, arguments['oc'],
                                   config_data["elastic_kibana"])

    if __name__ == '__main__':
        main()