Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pocounit-results可以自定义文件名和时间吗 #8

Open
jiabinOu opened this issue Dec 6, 2018 · 1 comment
Open

Pocounit-results可以自定义文件名和时间吗 #8

jiabinOu opened this issue Dec 6, 2018 · 1 comment

Comments

@jiabinOu
Copy link

jiabinOu commented Dec 6, 2018

Pocounit-results生成的结果会把上一次的覆盖掉,想通过设备和时间来区分

@adolli
Copy link
Member

adolli commented Dec 23, 2018

可以的,在PocoTestCase的子类里面复写classmethod name即可。例如

class XXX(PocoTestCase):
    @classmethod
    def name(cls):
        return 'test-xxx-{}'.format(datetime.datetime.now())

    @classmethod
    def getMetaInfo(cls):
        return {
            'deviceName': 'xxx',
            'batch': 'batch-xxx',
        }

这样就会在报告里根据你返回的name来显示。同样的还可以复写getMetaInfo来给这个测试用例提供更多运行时信息和报告信息。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants