Skip to content

Releases: hautof/haf

2.9.6

11 Oct 03:23
0633275
Compare
Choose a tag to compare
  • fix some issues
  • add some features

2.9.3

13 May 08:30
107ab71
Compare
Choose a tag to compare

2.9.2

07 May 08:49
c5b3f05
Compare
Choose a tag to compare
  • support case reuse by other case

example of reuse case: using 1.1.test1.response.body.data.name

1, using <@begin@> <@end@> to make haf find the tag

<@begin@>{'type':'int','case':'1.1.test1','property':{'1':'api_response','2':'body','3':'data','4':'name'}}<@end@>

2, type is the target type, case is the target case, property ordered by the number 1,2,3,4...., haf would find the target by the number
3, add dependent_var and dependent to the case

  • add GET/POST/PUT to the console output of http-request

2.9.0

29 Apr 11:29
c586a51
Compare
Choose a tag to compare
  • fix bugs:
    1, filter_case -fc error
    2, fix http_request by reqeusts's session
  • support sql server tool
  • add using_data to get method
  • change default log level to debug, on linux system always run failed of no debug output

2.8.8

25 Apr 09:06
efed500
Compare
Choose a tag to compare
  • fix one bug of urllib.urlopen 's request
  • when using get method:

1, if u want to using data as url, just not using using_data in kwargs

   Util.http_request(request)

2, if u want to using data as get's body, using using_data is nessary in http_request

  Util.http_request(request, using_data=True)

2.8.7

22 Apr 06:00
fbc8066
Compare
Choose a tag to compare
  • fix pyrunner bugs: must update from 2.8.5/2.8.6 #160
  • update readme
  • add debug output of lock

2.8.4

18 Apr 06:21
11c874f
Compare
Choose a tag to compare

Stable and Faster

  • Release 2.8.4
  • fix some bugs of -nout -llog -debug
  • make runner faster than before at linux/unix platform
  • add docs to py files

2.8.2

15 Apr 06:43
85c7de4
Compare
Choose a tag to compare
  • support new cmd prams

  • nout - no output

  • filter-case - filter cases to run

  • local-logger llog - local logger make haf faster

2.8.0

11 Apr 03:44
f984db2
Compare
Choose a tag to compare
  • add -no-output support (-nout=true)
  • add jenkinsfile test of nout
  • make sub log to one dir of test-name
  • fix some bugs

2.7.7

04 Apr 08:19
65cfa58
Compare
Choose a tag to compare
  • add pluginmanager
import itertools
import random

import pluggy
import json
import os
import sys
import argparse
from haf import hookspecs, lib


class PluginManager(object):
    def __init__(self):
        self.get_plugin_manager()

    def add_options(self, sub_run_arg_program):
        pm = self.pm
        return pm.hook.add_option(parse = sub_run_arg_program)

    def load_from_file(self, file_name):
        pm = self.pm
        inputs = pm.hook.load_from_file(file_name = file_name)
        if isinstance(inputs, list):
            return inputs[0]
        elif isinstance(inputs, dict):
            return inputs

    def publish_to_sql(self, args, results):
        pm = self.pm
        publish_result = pm.hook.publish_to_sql(args=args, results=results)
        return publish_result

    def start_web_server(self, args, bus_client):
        pm = self.pm
        result = pm.hook.start_web_server(args=args, bus_client=bus_client)
        return result

    def get_plugin_manager(self):
        self.pm = pluggy.PluginManager("haf")
        self.pm.add_hookspecs(hookspecs)
        self.pm.load_setuptools_entrypoints("haf")
        self.pm.register(lib)
        return self.pm


plugin_manager = PluginManager()
  • add hookspecs support
import pluggy


hookspec = pluggy.HookspecMarker("haf")


@hookspec
def add_option(parse):
    """add option to parse

    :param run args
    :return: None
    """


@hookspec
def load_from_file(file_name):
    """add option to parse

    :param run args
    :return: file_name
    """


@hookspec
def publish_to_sql(args, results):
    """publish result to sql

    :param publish : or not
    :param result : publish result
    :return : None
    """

@hookspec
def start_web_server(args, bus_client):
    """start web server

    :param args:
    :return:
    """
  • update sqlpublish and apiserver to new plugin mode