Friday, February 13, 2015

Learning from NFR (Non Functional Requirement)Testing

Learning from NFR Testing

---------------------------

1) Always use production like topology.
a) In case you cant, make sure people who are going to review it knows about it, suggest them the alternative and if they agree use it else your test will be considered as wrong.
2) All system configuration should be placed in one place and reviewed before testing begin else any change will lead to re-run of test.
3) All data preparation steps should be documented and source script should be attached to the confluence.
4)


Issue you may face and resolution:


Network issue - to check connectivity :


curl -s -v -x '' 'http://127.0.0.1:8080/soap//core/generateOutput?wsdl'

check curl documention for more specific command based on your requirement.

netstat  -o  -v -a | grep tcp    (check other option of netstat for more detail)


Memory and System stats:

 lscpu                          To know the system configuration
ps -aux  | grep <pid >

top         system stats

top -b  | grep <pid>    To see continuous CPU and Mem usage by a process.

pmap -x <pid>          Memory utilization for given process

vmstat                        Monitor virtual memory
free                             Display amount of free and used memory in the system.
pmap                          Display/examine memory map and libraries (so). Usage: pmap pid

sar                              For historical memory usage.

du -H                          For disk usage
df -h            For free disk

Above detail can also be viewed from Monitoring tools if used like Muning, Grafana


For thread analysis of your application :


jmap -dump:format=b,file=<heap-dump-file-path> <pid>

MongoDB stats command :

mongotop


Other things to check :


Access and server log of the application.
Other Application logs.(Jenkins, Mongodb, etc based on the which application is having issue.)


To find the number of thread a process can create : 
 ulimit
ulimit -v 
ulimit -s 

 ps -eLF| grep -c java

To find the number of thread a process created : 
 ps  hu H p  <pid> | wc -l


Force Head / thread Dump
jmap -F -dump:live,format=b,file=<PID>.bin PID

No comments:

Post a Comment