apiritif
apiritif copied to clipboard
Two classes doesn't show two tests in the report
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
Which result file format are you using? (the same question is do you use Apiritif in load testing mode or in functional testing mode?)
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
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.