V
V
Vladimir Krauz2016-08-28 22:32:35
Software testing
Vladimir Krauz, 2016-08-28 22:32:35

How to make a post request with a picture in yandex-tank?

Good afternoon.
I'm trying to test the system, but I can't figure out yandex-tank. I installed yandex-tank myself.
Created ammo.txt

[Connection: close]
[Host: x.x.x.x:port]
[Cookie: None]
/

It seems that this is how a normal get request is made, running yandex-tank ammo.txt - it writes an error.
[email protected]:~/Рабочий стол$ yandex-tank ammo.txt
22:27:57 [WARNING] /etc/yandex-tank is not accessible to get configs list
22:27:57 [INFO] Loading configs...
22:27:57 [INFO] Loading plugins...
22:27:57 [INFO] Performing test
22:27:57 [INFO] Configuring plugins...
22:27:57 [WARNING] Failed TCP connection test using [127.0.0.1]:80
22:27:57 [WARNING] Failed TCP connection test using [127.0.0.1]:80
22:27:57 [WARNING] Failed TCP connection test using [127.0.0.1]:80
22:27:57 [INFO] Exception: Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/yandextank/core/consoleworker.py", line 261, in perform_test
    self.core.plugins_configure()
  File "/usr/local/lib/python2.7/dist-packages/yandextank/core/tankcore.py", line 133, in plugins_configure
    plugin.configure()
  File "/usr/local/lib/python2.7/dist-packages/yandextank/plugins/Phantom/plugin.py", line 92, in configure
    self.phantom.read_config()
  File "/usr/local/lib/python2.7/dist-packages/yandextank/plugins/Phantom/utils.py", line 96, in read_config
    stream.read_config()
  File "/usr/local/lib/python2.7/dist-packages/yandextank/plugins/Phantom/utils.py", line 265, in read_config
    self.address, do_test_connect, explicit_port)
  File "/usr/local/lib/python2.7/dist-packages/yandextank/plugins/Phantom/utils.py", line 428, in resolve
    raise RuntimeError(msg % address_str)
RuntimeError: All connection attempts failed for 127.0.0.1, use phantom.connection_test=0 to disable it

22:27:57 [ERROR] All connection attempts failed for 127.0.0.1, use phantom.connection_test=0 to disable it
22:27:57 [INFO] Trying to shutdown gracefully...
22:27:57 [INFO] Finishing test...
22:27:57 [ERROR] Failed finishing plugin <yandextank.plugins.Aggregator.plugin.Plugin object at 0x7f1cd931fe90>: 'Plugin' object has no attribute 'drain'
22:27:57 [INFO] Finishing monitoring
22:27:57 [INFO] Post-processing test...
22:27:57 [INFO] Artifacts dir: logs/2016-08-28_22-27-57.WwbgWm
22:27:57 [INFO] Done graceful shutdown
22:27:57 [INFO] Close allocated resources...
22:27:57 [INFO] Done performing test with code 1

I couldn't figure it out even with the get request.
Just in advance, how to be then with a post request with a picture?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
P
PiterKey, 2016-09-01
@PiterKey

does it work without ammo.txt?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question