Categories
Performance Testing

TOP 15 Reasons why you can use jmeter for performance testing

 

  1. Jmeter is an open source tool.
  2. There seem to be more cost saving for MQ ,SOAP,FTP protocols when considering other proprietary tools in the market.
  3. Customized/Specialized reports are given in proprietary tools to attract the end users. Jmeter has simple reports and it will be helpful to analyse the server logs and get into the root cause of the performance issue. So if you do not want Grand UI reports , Jmeter will save more money from you pocket.
  4. User friendly UI.
  5. All the components are pre-built and readily available for use. Even the person who is not much comfortable with coding can understand and script in jmeter.
  6. Test can be executed in NON-GUI mode to save the machine resources.
  7. You can extend or write the new samplers in java and it can be included in jmeter.
  8. You can send the files with the request using simple configuration.
  9. It is easy to run multiple users (1000 User logins in ~2GB system) without worrying license cost.
  10.  Simple and effective session correlation for a web application.
  11. You can run multiple scripts consecutively(One at a time) , also all at a time (concurrently)
  12.  Response time results can be exported to CSV.
  13. Assertions will help to validate the response from the server easily.
  14. You can send JSON string and test JSON response for HTTP request.
  15. Various timers are there to introduce the delay concept
Categories
technews

What’s a cron and crontab?

Cron is a a time-based job scheduler in Unix/Linux environments. Cron can be used to schedule jobs to run periodically at fixed times, dates or intervals.  Crontab is a configuration file that specifies  shell  commands to run periodically on a given schedule.

Users can have their own individual crontab files and often there is a system wide crontab file (usually in /etc or a subdirectory of /etc) that only system administrators can edit.

Crontab format

MIN  HOUR DOM MON DOW <command to execute>

  1. MIN =Minute(0-59)
  2. HOUR =HOUR(0-23)
  3. DOM =Day Of Month(1-31)
  4. MON =Month(1-12)
  5. DOW =Day Of Week(0-6)

cron

How to view crontab entries?

To view current user’s crontab, use “crontab -l

eg :

cron1

 

 

To view other user’s crontab, login as root and give “crontab -u sam -l

cron2

 

 

How do I edit crontab entries?

We can issue “crontab -e”  for adding or editing crontab entries.

 

Categories
Performance Testing

Finding the number of lines of unique string in a file for specific duration- Linux

One day , I gone though a scenario where I have to count the number of lines of error string in a file for specific duration in the linux server using single command. I require it as I will be repeating it for multiple iterations of testing cycle.
As I did not have much experience in linux commands , I spent more time in browsing various web pages and finally I was able to join the commands in order to get one line command.

sample

 

 

 

 

 

 

I think this might be useful to many testers like me

Linux command for finding number of lines of unique string in a file for specific duration:
sed -n ‘/2013-12-24 20:20:00/,/2013-12-24 23:59:59 /p’ logfile.log | grep ‘error’ | wc -l

Or you can use this as well for quick view,
grep -i ‘error’ filename.log

Here You can update any string that has to be searched in grep ‘error’