Skip to main content

Posts

Showing posts with the label Jenkins

Automated Performance Testing with K6

Automated testing is running the tests and reporting results by tools with scripts. Automated performance testing is designing the performance test scenarios to run them spontaneously by tools and evaluating the result by tools to decide to go or not to go further. Automated Performance Testing is A subset of the performance test scenarios Designed to run spontaneously by tools Designed to evaluate the result by tools Designed not to break the system Having decision metrics, ex: max response time, max-average resp time, ... Designed to create reports for the concurrent and historical run What Types of Performance Testing Should be Automated Automated performance testing can be applied to all types of performance testing. However, each type needs a different level of maturity and sanity. Automated Performance Testing is Easily applied to load testing Hard to apply stress test, spike test, but have benefits Very hard to apply Soak-Endura

Adding Slave Jenkins to Master Jenkins

Jenkins is an orchestration tool that you can use it for general automated jobs. Using one Jenkins for every kinds of job create some inefficiencies so the better idea is grouping jobs for their functionalities and having them done with slave Jenkins. Each slaves can be attached to master as a node and waiting for command. With this way you can run Windows related jobs in Windows; unix or mac related jobs by unix system and so on. Moreover you can add multiple and exactly same slaves so that to run the jobs more quickly. In this post I want to share an idea for adding slaves to master Jenkins.  1. Go to master Jenkins > Nodes > New Nodes >    - Enter "Web Automation Slave 1"    - Select "Permanent Agent"    - Click "OK"      - Enter Labels > " regression "      - Click "OK"      - Click "Web Automation Slave 1"      - Copy the URL of this page          2. Go to slave Jenkins Mac

How to Add Screenshot to Jenkins Cucumber Reports for Capybara

If you are using Capybara and Cucumber for test automation and Jenkins for CI/CD process you can run your test over Jenkins and see the result by Cucumber Result Plugin , for more information check the plugin page . By this plugin you can also see the screenshots taken when test cases fail.  To produce the result you need to save the result of the test as .json file, you can use the following command:      cucumber features -f json -o cucumber_result.json To enable to take screenshot if a case fails you need to set the application hook  of after case. The following configuration makes it automatically. See it and change screenshot path with your path. The key point is embedding the image after taking it then reports plugin make it visible on the report. Cucumber Result Plugin Screenshot for the failed test case

Performance Testing on CI: Integration of Locust and Jenkins

It is a raising question around performance testing people that how to integrate, super hero tool, Locust to Jenkins as a step to continues integration (CI) pipeline. There have been some solutions for this but they are not simple, plus you need to write own log writer to handle this problem.  Actually there was a commit to save the result of the test but it has not been merged to Locust. With these commit we can integrate Locust to Jenkins. Update Locust This  update  is still open so you can not see it in latest Locust version yet. However you can  use this by updating your local repository, or just change two files  main.py  and  stats.py  with the files in your local. For Window change the files in the following directory:  C:\Python27\Lib\site-packages\locustio-0.7.3-py2.7.egga\locust\stats.py and for Unix-base OS change the files in the following directory:  /Library/Python/2.7/site-packages/locust/stats.py.  Alternatively, you can clone this commit from github and instal

Performance Testing on CI: Locust is running on Jenkins

For a successful Continuous Integration pipeline, there should be jobs for testing the performance of the application. It is necessary if the application is still performing well. Generally performance testing is thought as kinds of activities performed one step before going to live. In general approach it is true but don't forget to test your application's performance as soon as there is an testable software, such as an api end point, functions, and etc. For CI it is a good approach to testing performance after functional testing and just before the deployment of next stage. In this post, I want to share some info about Jenkins and Locust. In my previous post you can find some information about Locust and Jenkins. Jenkins operates the CI environment and Locust is a tool for performance testing. To run the Locust on Jenkins you need command line arguments which control the number of clients ,   hatch rate,  running locust without web interface and there should be so

Jenkins: How to Sync Local Repository with GitLab / Trigger from GitLab

If you want to update your code in the local repository from git (gitlab, github, gitorious), you need to run git pull  into your repository. If you want to do this by Jenkins, you can create a job that can perform this action. There may be easier way to solve it but you can follow the instruction below: Create a Job to Pull the repo Jenkins > New Item > Freestyle Project > "OK" Build > Build Steps > Execute Windows Batch Command> Enter your command and save it Install GitLab Hook Plugin Jenkins > Manage Jenkins > Manage Plugins > Find Correct Plugin > Install it Create Deploy Keys on GitLab GitLab > Your Project Page > Settings > Deploy Keys > Click 'New Deploy Key' Be sure that you are changing your project settings! Create Deploy Keys and Services on GitLab GitLab > Your Project Page > Settings > Services > Click 'GitLab CI' Enter token, run the fo

Configuration of Jenkins on Windows Server for Capybara and Calabash Projects

I think the most challenging part of test automation is nowadays having Continuous Integration and one step more is having Continuous Deployment. These two terms have been a buzzwords around the software community, and everyone is talking about them but there are very few companies that can apply these. The reasons behind this can be listed as: Mis-understanding of agile and scrum Lack of "real" test engineers and Lack of Dev-ops culture  Lack of stable test environments  Lack of vision in the software industry, which saving the day is more critical than saving the future Out-of-budget, not investing on good people but investing in tools On the other hand, there are lots of open-source tools that you can just build and configure your own CI, and maybe next step goes to continuous deployment. In this post, I want to explain how you can set up CI on a Windows server. I will use the following tools/technology and language: Ruby, Gem (many Gems), Capybara, Cucumbe