apiritif icon indicating copy to clipboard operation
apiritif copied to clipboard

Two classes doesn't show two tests in the report

Open karthikeayan opened this issue 6 years ago • 4 comments

import time
import unittest
from apiritif import http, transaction

target = http.target('https://jsonplaceholder.typicode.com')
target.keep_alive(True)
target.auto_assert_ok(False)
target.use_cookies(True)

class TestRequests2(unittest.TestCase):
    def test_1_single_request(self):
        target.get('/')    

class TestRequests(unittest.TestCase):
    # will produce test-case sample with one sub-sample
    def test_1_single_request(self):
        target.get('/')

Expected : TestRequests and TestRequests2 in the report Actual : Everything goes inside TestRequests

karthikeayan avatar Jul 13 '18 12:07 karthikeayan

Which result file format are you using? (the same question is do you use Apiritif in load testing mode or in functional testing mode?)

dimp-gh avatar Jul 13 '18 13:07 dimp-gh

I see this in BlazeMeter logs.

[2018-07-13 08:29:47,884 DEBUG bzt.utils] Executing shell: ['/usr/bin/python', '-m', 'apiritif.loadgen', '--result-file-template', '/tmp/artifacts/apiritif-%s.ldjson', '--concurrency', '1', '--iterations', '1', '--hold-for', '1140.0', '--ramp-up', '60.0', u'artifactory-test.py'] at /tmp/artifacts

karthikeayan avatar Jul 13 '18 15:07 karthikeayan

Sorry, it somehow took a while to reproduce that one. Can you post a screenshot of your report?

It looks like a nuance of BlazeMeter reports for functional tests. Every sample is merged into a single tree with a single root element. That's why samples got inside a single root.

dimp-gh avatar Jul 23 '18 13:07 dimp-gh

screen shot 2018-07-28 at 12 56 39 am

karthikeayan avatar Jul 27 '18 19:07 karthikeayan