Forum

Forum Navigation
You need to log in to create posts and topics.

Running parallel tests using GNU parallel

Here is a sample Jenkins console job for launching jobs in parallel using GNU parallel

From a static list of URLs

echo Cleanup logs and report files

rm -rf *.out
rm -rf *.log
rm -rf *.json
rm -rf *.html
rm -rf *.png

echo Generating file with test URLs

echo "https://tokenized-test-url1" > jobs.list
echo "https://tokenized-test-url2" >> jobs.list
echo "https://tokenized-test-url3" >> jobs.list

echo Run parallel test executor
/usr/local/bin/parallel -a jobs.list -j$workers 'nohup docker run --rm -v "$(pwd):/var/boozang/" styrman/boozang-runner --file=t{#}_w{%} {} > t{#}_w{%}.log;'


Based on test suite:

echo Running $workers processes for tags: $suite

echo Cleanup logs and report files

rm -rf *.out
rm -rf *.log
rm -rf *.json
rm -rf *.html
rm -rf *.png

echo Seeting base url
URL="http://staging-be.boozang.com/extension?token=9b1cef55504467b6436ab2aaffe93f925e3f275e64f84941a326d4d8#5e3f275e64f84941a326d4d8/ci40"
echo $URL

echo Generating feature list from tags

docker run --rm -v "$(pwd):/var/boozang/" --name tagmanager styrman/boozang-runner --file="result" --listsuite=$suite $URL

awk -v url="$URL" '{print url $0}' result_list-scenarios.txt > jobs.list

echo Run parallel test executor
/usr/local/bin/parallel -a jobs.list -j$workers 'nohup docker run --rm -v "$(pwd):/var/boozang/" styrman/boozang-runner --file=t{#}_w{%} {} > t{#}_w{%}.log;'


 

Based on tags:

echo Running $workers processes for tags: $tags

echo Cleanup logs and report files

rm -rf *.out
rm -rf *.log
rm -rf *.json
rm -rf *.html
rm -rf *.png

echo Seeting base url
URL="http://staging-be.boozang.com/extension?token=9b1cef55504467b6436ab2aaffe93f925e3f275e64f84941a326d4ee#5e3f275e64f84941a326dee/ci40"
echo $URL

echo Generating feature list from tags

docker run --rm -v "$(pwd):/var/boozang/" --name tagmanager styrman/boozang-runner --file="result" --listscenarios=$tags $URL

awk -v url="$URL" '{print url $0}' result_list-scenarios.txt > jobs.list

echo Run parallel test executor
/usr/local/bin/parallel -a jobs.list -j$workers 'nohup docker run --rm -v "$(pwd):/var/boozang/" styrman/boozang-runner --file=t{#}_w{%} {} > t{#}_w{%}.log;'

 

Try Boozang today

Codeless testing that works. No credit card or commitment required.