Skip to main content

Posts

Showing posts with the label Continuous integration

Isolated - Scalable Performance Testing: Locust in Dockers

I have shared some posts how to run Locust in Local or in Cloud, as slave or master. At this time I want to share how you can run it in a Docker. To fully get the benefits of Locust I am using it with Python 3 so I created a Docker file and images upload to the Docker Hub , and the project is on the GitHub .  The Dockerfile has the minimum available requirements but we also have a new file called `requirements.txt` which you can add required python libraries to install inside the container by pip install lib . The Dockerfile is: When you got the docker-locust image, you can now run your script. At the end of the Dockerfile you can see that ENTRYPOINT [ "/usr/local/bin/locust" ] this enable us to use the image as service  which means that you can directly call it same as using Locust installed locally. See the run command below: Running Locust in a Docker Running the Locust with my image is pretty simple if you used without docker, just try other options w

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

What Reminds From Testistanbul 2016

First of all, I am appreciated to attend to an international conference on software testing. It is 7th international Testistanbul conference. There was good number of attendants from newly starters to over 30 years of experienced professionals. Most of the attendants were from Turkey thought there were some guys from abroad and some international companies to present their products. Testistanbul conference is important because it is definitely the most valuable conference on software testing in Turkey. It gives us opportunity to meet largest professional group and to share the knowledges in domestic market. The conference topics were as follows:  09:00 - 09:30 OPENING CEREMONY SPEECH: FORMULA 1, CONTINUOUS INTEGRATION, CONTINUOUS DELIVERY AND TEST DATA MANAGEMENT PROCESSES - TURKEY SOFTWARE QUALITY REPORT (TSQR) 2016 / 17 (In Turkish) Koray Yitmen 09:30 - 10:15 IBM SPONSOR SPEECH: SHIFT LEFT FOR HIGHER QUALITY AT GREATER SPEED Mehmet

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

Continous Integration Definition of DONE

Continuous Integration is easy if you are ready for the definition of DONE (DoD). It is not only accepting a story as successfull after developped by a developer but it also includes a process which ends after deploying to live and ensuring that it works and does not cause a defect in the live system. Handling DONE actually means of CI. With Scrum there is always one shippable product at the end of each sprint. This shippable product has to include some new features. Definition of Done helps to Scrum to clear the definition of every stages of development, such providing checklist for discussion, estimationa and design, so it makes the user stories more understandable and applicable.  What Definition of Done includes: Identifying the list of acceptance criteria Development Unit testing Funtional testing Regression testing Acceptance testing Performance testing Deployment Documentation Tracking  DONE Every stage can also have sub-stages, DoD should be prepea

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

Basics of Continuous Integration(CI)

Continuos Integration shortly as CI is a development practice which developers push their code frequently to the development environment and then automated build system build the code and then test it and gives feedback about the newly added code. By this way, codes are added to the main repository in a small piece which reduces the complexity and deltas between new code and the code in development environment. Developers also can reach the latest build code easily. Think that every developer pushes one time in a day, the delta is just a day but if they push one time for week then the delta is 5 times bigger, correspondingly complexity is also 5 times bigger. CI Pipeline One of the biggest problem for delivering a feature late is spending longer time for testing product and fixing defects. A classical approach tells us to test at the end of the development but it is usual that planned time is consumed during analysis and development periods. Therefore, after the develo

Basics of Continuous Integration (CI)

Almost every methodological approach in software development aims to reduce development time and produce more qualified products. Continuous Integration (CI) also aims to reduce development time. Basically, CI is software development practice that developers need to check-out their codes in their local development environment and than integrate them to shared repository. According to Martin Fowler who known by his studies about CI, there should be at least one integration to shared repository done everyday, but the frequency of integration is expected to be more than one integration. By this way, test activities are performed during every integration and problems caused by the integration can be minimized. As it is emphasized in this blog , CI says us as "pay me now, or pay me more later" . If we look at the history of CI, it goes back to extreme programming (XP) which advocates that there should be frequently code merged to master to cover unstable requirements of customer