Use tsung to test https site


To use tsung to test https site, you need to set type as ssl.

<servers>
<server host=”web_server_name” port=”443″ type=”ssl“></server>
</servers>

If you have issues to make it work for you, change the loglevel to debug to get useful logs.

<tsung loglevel=”debug” version=”1.0″>

In my case, I run tsung on a EC2 using Amazon Linux. The erlang was installed from the Amazon Linux repo. It is V14, which is too old to support SHA256 certificate. I got an error saying ‘Type not compatible with table constraint‘.

The fix is to install a newer version of erlang. I used the source codes and compiled it with ssl support. If you don’t install it in /usr/local/lib/erlang folder, then you may have to re-compile tsung and specify the erlang binary path.

yum install gcc gcc-c++ glibc-devel make ncurses-devel openssl-devel java-1.8.0-openjdk-devel

./configure --with-ssl=/usr/include/openssl/
make
make install

To test the SSL support of erlang, you can run:

[root@ip-172-31-4-55 config]# erl
Erlang R14B04 (erts-5.8.5)  [64-bit] [rq:1] [async-threads:0] [kernel-poll:false]

Eshell V5.8.5 (abort with ^G)
1> ssl:start().
ok
2> {ok, Socket} = ssl:connect("web_server_name", 443, [], infinity).
Advertisement

One thought on “Use tsung to test https site

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s