Finding code coverage is very important for testing because it allows you to measure your testing efforts. If you have a test suite prepared for your application but you are not sure test suite covers how much percentage of code then finding the code coverage will be good practice Once you get the coverage report, you will know exactly what part of code is not covered in your test case and then you can add test cases to cover the code.
Jacoco is java code coverage tool which allows you to calculate code coverage for your unit tests and instrumented tests. Jacoco can be used with Ant, Maven & Gradle build tools. Today, I will show you step by step integration of Jacoco with Gradle for Espresso test suite.
I have done this setup for Simple Hello world project to give idea of how Jacoco works and gives proper code coverage report.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 |
import android.os.Bundle; import android.support.test.runner.AndroidJUnitRunner; import android.util.Log; import java.io.IOException; import java.lang.reflect.Method; import java.nio.charset.Charset; public class AndroidJacocoTestRunner extends AndroidJUnitRunner { private static final Charset UTF8 = Charset.forName("UTF-8"); static { // System.setProperty("jacoco-agent.destfile", "/sdcard/coverage.ec"); } @Override public void finish(int resultCode, Bundle results) { try { Class rt = Class.forName("org.jacoco.agent.rt.RT"); Method getAgent = rt.getMethod("getAgent"); Method dump = getAgent.getReturnType().getMethod("dump", boolean.class); Object agent = getAgent.invoke(null); dump.invoke(agent, false); } catch (Throwable e) { final String trace = Log.getStackTraceString(e); try { System.out.write(trace.getBytes(UTF8)); } catch (IOException ignored) { } } super.finish(resultCode, results); } } |
1 2 3 4 5 6 |
testInstrumentationRunner "com.example.anuja.myapplication1.AndroidJacocoTestRunner" also add code given below in buidTypes. debug { testCoverageEnabled = rue } |
In this post of Writing Effective Business Emails, we will be covering following:
Below is the list of free ebooks on Elasticsearch, Kibana, ELK Deep Learning is a subfield of Machine Learning which learns Question: Write a program to perform shell sort Question: Write a program to perform merge sort Question: Write a program to sort ‘GlobalSQA’ Question: Write a program to perform bubble sort Question: Write a program to perform insertion sort on [85, Question: Write a program to perform Quick sort on [85, 63, 0, Question: Write a program to find the sum of diagonal elements Question: Write a program to reverse a number Program:Latest Posts
Free Elasticsearch eBooks
Free Deep Learning eBooks
Shell Sort
Merge Sort
Lexiographic Sort
Bubble Sort
Insertion Sort
Quick Sort
Sum of diagonal elements using Comprehension
Reverse a number
In this article, we will be covering following:
QA Team start writing Test Scenarios & eventually Test Cases based on some input documents – Business Requirements Document (BRD), Functional Specification Document (FSD) and Technical Design Document (optional).
Ex:- BRD & FSD
BRD | FSD |
---|---|
Based on the two input documents, below is the list of high-level scenarios to test:
For each Test Scenario, you are going to have at least 1 or more Test Cases. So, include another column and write the Test Case IDs as shows below:
At this stage, Traceability Matrix can be used to find gaps. For example, you see that there are no test cases written for FSD section 1.2 in the above Traceability Matrix.
As a general rule, any empty spaces in the Traceability Matrix are potential areas for investigation. So a gap like this can mean one of the two things:
If it is scenario 1, it will indicate the places where test team needs to work more to ensure 100% coverage. In scenario 2, TM not just show gaps it also points to incorrect documentation that needs immediate correction.
Let us now expand the TM to include test case execution status and defects.
The below version of the Traceability Matrix is generally prepared during or after test execution:
Below is the list of free ebooks on Elasticsearch, Kibana, ELK Deep Learning is a subfield of Machine Learning which learns Question: Write a program to perform shell sort Question: Write a program to perform merge sort Question: Write a program to sort ‘GlobalSQA’ Question: Write a program to perform bubble sort Question: Write a program to perform insertion sort on [85, Question: Write a program to perform Quick sort on [85, 63, 0, Question: Write a program to find the sum of diagonal elements Question: Write a program to reverse a number Program:Latest Posts
Free Elasticsearch eBooks
Free Deep Learning eBooks
Shell Sort
Merge Sort
Lexiographic Sort
Bubble Sort
Insertion Sort
Quick Sort
Sum of diagonal elements using Comprehension
Reverse a number
This article isn’t only going to cover Test Cases Vs Test Scenarios but it will cover following:
Few years back, when I was working in an MNC and dealing with a testing project, I suggested my colleagues to document the test Scenarios instead of test cases. Can you imagine, their reaction amazed me as they all were staring at me all together, I could not argue. It was like I have made a big mistake in my life. Everyone’s opinion was same except mine. They prefer to follow the traditional method of writing Test Cases and not Test Scenarios. Those who are newbies in this field might get confuse with the word Test Scenarios and Test Cases. This article will clear all doubts about it by giving real time examples and explanation.
Few years later, I Switched to another company and handled a testing project which was based on searching and generating different reports with the help of different menu options. We in a team were discussing about the project and how we can proceed with that? Actually, client wanted that project early and we were having deadline to complete the project. Considering my last experience about suggesting the documentation of Test Scenarios, I kept quiet and thinking of other idea. Suddenly, one of my colleagues raised his voice that “We should prepare Test Scenarios in a document”. This time, everyone was quite satisfied with his idea and we further started preparing the Test Scenarios. The conclusion of both cases suggests that preparing the Test Scenarios and Test Cases depends on the urgency and requirement of the project. Generally, in companies, test cases are prepared rather than documenting test scenarios.
As we all know nothing is permanent and with this concept, the software industries and their processes are also changing with time and cost constrains.
V-models and waterfall models which are considered to be traditional models are being replaced by iterative and agile models. In every testing project, document is indeed essential but to complete the project fast within the deadline and to make the process transparent and easy, the way of documentation is changed these days.
One of my experience will give you clear picture.
I was handling one of the testing projects from fortune 500 company and they didn’t give us any deadline to complete the project. That mean we were having flexible timelines to complete the project. We were already having template of test cases, and with the help of that we prepared the test cases and it got approved from client as well.
Once the development team finished their module, they were giving us to test it and most of our duty was to follow 100 test cases in a day. We used to document with pass/fail result, further sending it to the client at the end of the day. The project was really big and had different modules within it. To do the same process of documenting the test cases was a monotonous work for some of my colleagues. But at the end of the day, the company was generating revenue from it.
During the project, we had one break where we were not having any task of documenting the test cases. We were having a good time and I was discussing about new ideas and techniques so as make improvement in the existing test cases. I have found during that discussion that none of my colleague was interested in implementing those new ideas and techniques as they thought all the test scenarios is been covered already while making huge amount of test cases. No one was really interested in putting the efforts for new techniques as it a human mentality that we do not want to rework once the work is done. Our mind automatically stops making any efforts for any new ways and techniques for the past work. Same had happened with my colleagues and they just wanted to relax on that certain day.
It is also a fact that in IT companies, most of the testers follow the mechanical process of making the test case and no one really makes effort to make additional test case for the existing one? The same might have also happened with you, if I am not wrong.
Another experience:
While extensively involved in a team challenge activity, we were having a discussion and asked the team members to prepare the test scenarios for the product. We have all started to make the test scenarios and there was not a specific document where we would literally fill expected result and pre-condition for each test case. At the end of the day, we have collected almost 50 test scenarios and it was indeed a great experience while proceeding with that project.
Assume that you are having your website and it has features like username, password, and login page along with cancel button. If you were asked to write the test cases for the above features then your test case may exceed 50 and if you would ask to write the test scenarios, then it will be just a matter of lines. Below explanation will give you the exact idea about test scenario.
High Level Scenario: Login Functionality
Low Level Scenarios:
As we all are at short of time, test scenarios just acts as pain killer spray rather than that old time IODEX. And still the effect is same in both the case.
Finally, I would like to summarize difference as below:
Test Cases |
Test Scenarios |
|
What it is => | A concept which offers complete info what to test, steps to be taken and expected result of the same | A concept which offers one-line info about what to test. |
It’s about => | It’s more about documenting particulars. | It’s more about rational and conversing particulars. |
Importance => | It’s significant when testing is off shored and development is onsite. Writing test cases with particulars will aid both dev and QA team in sync. | It’s significant when time is less and most of the team members can agree / appreciate the details from one-liner scenario. |
Advantage => | One time documentation of all the test cases is helpful to track 1000s rounds of regression testing in future. Most of the time, it is helpful while bug reporting. Tester just need to give reference of test case ID and does not require mentioning each and every minute detail. |
A time saver and idea generation activity, favoured by new generation software testing community. Modification and addition is simple and not specific to a person. For a huge project, where group of people know specific modules only, this activity gives a chance to everybody to look into other modules and brain storm and deliberate. |
Beneficial to => | A full-proof test case document is a life line for new tester. | Good test coverage can be attained by dividing application in test scenarios and it decreases repeatability and complexity of product |
Disadvantage => | Time and money consuming as it requires more resources to detail out everything about what to test and how to test | If created by exact person, the reviewer or the other user might not sync the precise idea behind it. Need more discussions and team efforts. |
Test cases are most significant part of Software Testing Life Cycle which is also referred as STLC. With its absence, it’s tough to understand, track, follow and reason out something. But in the era of Agile, test cases are being substituted fast with test scenarios.
Database testing, GUI testing, functionality testing has the common test checklist which is coupled with modern artillery and test scenarios. With participation in trainings, Discussions, questions and practice one can definitely learn and change the final graph of Bug report matrix and your productivity.
Below is the list of free ebooks on Elasticsearch, Kibana, ELK
Deep Learning is a subfield of Machine Learning which learns
Question: Write a program to perform shell sort
Question: Write a program to perform merge sort
Question: Write a program to sort ‘GlobalSQA’
Question: Write a program to perform bubble sort
Question: Write a program to perform insertion sort on [85,
Question: Write a program to perform Quick sort on [85, 63, 0,
Question: Write a program to find the sum of diagonal elements
Question: Write a program to reverse a number Program:
Salary Negotiation is itself an art and this article will help you to engage few important points to consider while negotiating salary.
You need to be very smart while negotiating your salary. It is easier to say yes for the job, but when it comes to negotiating your salary then all the scenario changes suddenly. That’s why it is indeed essential that you know the tactics of it hence gaining satisfaction for the work that you will accomplish.
You need to impress your hiring manager by showing him your value gracefully. This might impress him while changing his mind to raise your salary. There are chances that your hiring manager may not change his mind at all, but that is absolutely fine as it is always good to raise your voice, hence adding value to personality. It will also show that you are taking this position seriously. If company goes through the whole recruiting-interviewing-hiring process again, chances are more that they spend huge cost, compared to previous scenario in the long run.
Let’s take a simple example to make you understand more about Salary Negotiation and the tactics involved in it. Assume that you are selling your old car and the buyer asks you “What is the best price you have kept on this car?” You answer him by saying $9000 and the buyer quickly says agreed, sold it. Huh! This is the point when you start doubting yourself and feel that you might have offered very less value to the car. You might think that you would have increased the price with more dollars. Moreover, if the buyer asks you, “Don’t you think the price is too high, for this car?” then you firmly answer him “I have done my homework perfectly and this is the best price the car deserves”. At the end of the talk, the buyer finally agrees and pays for the asked price. This also gives you winning the conversation feeling, further gaining worth for sticking to your guns. Well, getting the big difference here?
The same happens while negotiating your salary in front of hiring manager. If you came to know that the company needs resource in their current project and they are looking for you as their potential employee, then it’s time for you to keep your worth. Have a discussion with your hiring manager at proper situation and tell him that you are beyond your midpoint level and need a boost in your salary so as it will keep you motivated. Tell him you are getting less salary then your peers, in spite of being such an incredible resource. Keep in mind that you need to be very polite and say this in very joking manner so that the hiring manager notices your perspective while not taking any negative out of it.
One tester from our Testing Community have applied same tactics in his current company and got a bonus of $5000 in base salary that finally benefitted him in the long run.
Having courage doesn’t mean you have to directly ask your employer about salary at first instance. Have patience first and see that you clear the pre-screening process and first round of interview. After that when you are being called for the second or final round of interview that time pay attention to the intention of the employer and what he is trying to convey you. Based on his question, answer smartly while keeping value of yourself. Believe in yourself and ask what you deserve. Do not hesitate for asking the value which you deserve the most. Have some courage while asking and negotiating the same.
Following questions and answers will help you in this.
Employer: “Mr. John, what salary are you looking for?”
Candidate: Well, I am here for two reasons. Firstly, this company is excellent and always beyond in every aspect. Working here will definitely enhance my skills and confidence. Secondly, I will have a secure job. I have researched for this position and as per my knowledge, the salary offered for this role is around $65000-$70000. I would love to have salary in such range.
Employer:” We are impressed with your credentials and what salary would you expect for this position?”
Candidate: I am flattered to hear this and would like to work with this company. We will definitely work together and give our best. Currently, I am earning $65000 and primarily looking for at least $70000 as a base salary.
Below is the list of free ebooks on Elasticsearch, Kibana, ELK Deep Learning is a subfield of Machine Learning which learns Question: Write a program to perform shell sort Question: Write a program to perform merge sort Question: Write a program to sort ‘GlobalSQA’ Question: Write a program to perform bubble sort Question: Write a program to perform insertion sort on [85, Question: Write a program to perform Quick sort on [85, 63, 0, Question: Write a program to find the sum of diagonal elements Question: Write a program to reverse a number Program:Latest Posts
Free Elasticsearch eBooks
Free Deep Learning eBooks
Shell Sort
Merge Sort
Lexiographic Sort
Bubble Sort
Insertion Sort
Quick Sort
Sum of diagonal elements using Comprehension
Reverse a number
Software requirements are indeed essential for test estimation as it is based completely on what would be tested. The development team has much involvement in the software requirements as compared to the testing team and the requirements are mostly established by the development team. When all the estimation are done related to the project cost, duration of the project then the development team asks the testing team that how much time will be required by them in order to complete the testing of the application. The answer given by the testing team is considered for the SDLC process.
Testing team plays a vital role in estimation of the project because testing is an essential part of SDLC. Testing application, one can deliver a bug free application to the client.
The testing team classifies the requirements before estimating them in the following categories:
The expert opinion in each requirement suggests how long it would take for testing them. The categories would eventually help the experts in estimating the effort for testing the requirements.
Previous project knowledge and experience are used for the estimation of the project. If new project is introduced then its estimation is based on similar projects which have been executed previously.
Organization should create an Organization Process Database which is also referred as OPD, where the project metrics are recorded and referred for future projects.
Spreadsheets and Old process is still used by the testing team in order to estimate the project completely. If new rules are introduced during the process then the testing team follows that and at the same time compares the old process too so as to get complete idea in test Estimation.
The results which come from the new estimate process should be faster and cheaper as compared to the old process and in percentage of 20 to 20%. If different percentage are measured by the testing team then they go back to the old process to check whether they are missing something during the process or not.
During testing of the process all the results should be recorded in order to refer it for future projects. It is also beneficial when requirements of the projects change and hence the recording will eventually help the testing members in estimating the project. This will help testing team to not return all the steps again and will further help in taking same decisions. It also gives the opportunity to test the estimation before making any changes to it.
A spreadsheet containing metrics eventually helps reaching the estimation as quickly as possible. The spreadsheet will calculate it automatically hence giving ease to the team members. It also helps in tracking the duration and time of the projects.
Risk Table, and free notes should be included in the template and need to be filled in the tool. These tools also help in showing different options for testing which actually aids the customer in deciding which types of test he needs practically.
All estimation should be verified in a certain period of time. Along with this, another spreadsheet for recording the estimations should be created. The estimation is compared to the previous ones recorded in a spreadsheet so as to see if they have similar trend. If the estimation has any deviance from the recorded ones, then it is indeed essential to a re-estimation of the entire project.
Product down time, resource unavailability, skill improvement and learning capability are some of the risks that should be covered in test estimation.
Assume you have a project and you have estimated that it will take a 10 person team 300 days to complete. (3000 workdays – Sunny day scenario)
Knowing that there are 365 working days in a year (52 weeks x 5 days), without holidays, means that the project, at best, will take 1.13 years or 13.6 months to complete.
Suppose the average year includes 12 days company holidays (total impact = 12×10 people = 120 daysx1.13years = 136 days) and average employee takes 4 sick days and 3 comp days off a year (total impact = 7 x 10 people = 70 x 1.13 = 79)
Average employee takes 7 work days of vacation a year (total impact = 7 x 10 people = 70 x 1.13 = 79)
Suppose also that each employee drops 3 days out of each year for training (30 days)
Total duration change due to employee holidays, sick time, vacation and training = 136+79+79+30=324
Total workdays for the project is now 3000+324 = 3324 or a 10.8% increase in duration (300 day schedule is now 333 days or 15.1 months.)
Below is the list of free ebooks on Elasticsearch, Kibana, ELK
Deep Learning is a subfield of Machine Learning which learns
Question: Write a program to perform shell sort
Question: Write a program to perform merge sort
Question: Write a program to sort ‘GlobalSQA’
Question: Write a program to perform bubble sort
Question: Write a program to perform insertion sort on [85,
Question: Write a program to perform Quick sort on [85, 63, 0,
Question: Write a program to find the sum of diagonal elements
Question: Write a program to reverse a number Program:
If you want to be successful in Project Test Estimation then you should have execution knowledge which is eventually very significant in Software Testing Life Cycle. Software Test Estimation Techniques are indeed essential to make good reputation with your client when you bid for testing projects. It also gives you idea that how your approach should be during the execution of the project.
In case, you have experience in various software testing life cycle then chances are higher that you estimate your project very well as your experience may help you in providing various ideas & techniques for that testing project. It is practically not possible to put some number of days or estimate with old time formula of one third of the development effort. The requirement keeps on changing from client side & we have to adjust the same accordingly. Some companies which offer testing services use this formula which isn’t correct as it is not based on any scientific techniques or principles.
Following factors are indeed essential for any software test estimation and they are highly recommended in any software testing organization.
Many techniques are used in recent years that have been developed for test estimation of the software.
Use-Case Point Method is completely based on the use cases that we calculate the un-adjusted actor weights to determine the software test estimation.
Use case is a document which well specifies systems, different users or other stakeholders that interact with the concerned application. They are certainly named as ‘Actors’. The interactions achieve some defined goals hence protecting the interest of all stakeholders via flow termed or different behavior as scenarios.
The formula used for this technique is:
3-Point Software Testing Estimation Technique is completely based on statistical methods where each testing task is broken down into sub tasks and further into three types on each tasks.
The formula used by this technique is:
Test Estimate = P + (4*N) + E / 6
Whereas P = Positive Scenarios or Optimistic Estimate (Best case scenario in which nothing goes wrong and all conditions are optimal.)
N = Negative Scenarios or Most Likely Estimate (most likely duration and there may be some problem but most of the things will go right.)
E = Exceptional Scenarios or Pessimistic Estimate (worst case scenario which everything goes wrong.)
Standard deviation for the technique is calculated as,
Standard Deviation (SD) = (N – E)/6
This method is created by breaking down the test project into small pieces. Modules are separated into sub-modules. Sub modules are then further separated into functionalities and functionalities are then separated in sub-functionalities.
You should review all the requirements from Requirement Document so as to make sure that they are added in WBS. Later, figure out the number of tasks your team needs to complete. Estimate properly the duration of each task.
Following the same procedure as above in WBS. In this, work breakdown structure is disintegrated for each task and further distributed to a team comprising of say 3-7 members so as to re-estimate the task. The final estimate is the consequence of the brief estimates that are based on the team consensus. This method actually speaks more on experience instead of any statistical formula. Moreover, this method is initially popularized by Barry Boehm to emphasize on the group iteration so as to reach to a consensus where the team visualize on the different aspects of problems whereas estimating the test effort.
The Function Point technique is a direct pointer of the functionality of software application from the user’s viewpoint. This technique is the most accepted technique that is used to estimate the size of a software project.
This technique is also a part of TMap. In function point technique, function points are converted into test points. In Test Point analysis, we carry out following:
In Software Testing, estimation is generally based on previously created application prototype or requirement specification document. To calculate FP for a project, some of the major components are required.
The major components required are:
Unadjusted Data Function Points:
Unadjusted Transaction Function Points:
Number of Test cases = [Number of Function Points] x 1.2
Total Actual Effort, TAE = (Number of Test cases) * (Percentage of development effort /100)
This method is used when requirement document or a detailed low level design document is available. Previous data for development and testing & measure of function point is available.
Below is the list of free ebooks on Elasticsearch, Kibana, ELK Deep Learning is a subfield of Machine Learning which learns Question: Write a program to perform shell sort Question: Write a program to perform merge sort Question: Write a program to sort ‘GlobalSQA’ Question: Write a program to perform bubble sort Question: Write a program to perform insertion sort on [85, Question: Write a program to perform Quick sort on [85, 63, 0, Question: Write a program to find the sum of diagonal elements Question: Write a program to reverse a number Program:Latest Posts
Free Elasticsearch eBooks
Free Deep Learning eBooks
Shell Sort
Merge Sort
Lexiographic Sort
Bubble Sort
Insertion Sort
Quick Sort
Sum of diagonal elements using Comprehension
Reverse a number
Today, everyone is inclined towards learning automation. Therefore, tester looks for website modules and visits multiple websites for automation practice. To encounter this problem, we have come up with different website modules under one roof. We developed multiple web pages and include all website components which you may get by visiting N number of websites.
You can practice Selenium, QTP, Ranorex etc scripts on this site. Try automating all simple and complex elements mentioned in this page. And if you are able to automate them then I can guarantee that you can automate any type of website.
Below is the table for the same:
https://www.globalsqa.com/demo-site/
Readers might feel that there are many similar websites in the market and we totally agree with that. There is one thing which makes this testing website different from other automation practice websites that is we have covered different type of components for each category. Example : if anyone clicks on AlertBox, you will find multiple type of Alert Boxes for automation practice.
Not only this, we have seen a trend of AngularJS Website these days (It’s a complete JavaScript-based open-source front-end web application framework mainly maintained by Google). Tester started learning Protractor (Protractor is an end-to-end test framework for AngularJS applications) to automate AngularJS Application. It seems difficult to find AngulasJS website because it can’t differentiated by looking at the site. We need to see website source code or need to install some plugin to identify whether a website is developed using AngularJS or not.
Also, it’s difficult to find AngularJS Protractor automation practice website and all modules. We have come up with different AngularJS components and projects so that no one needs to search for these modules or sites. So, learn protractor to automate AngularJS website. Below is the table showing all the AngularJS modules.
https://www.globalsqa.com/angularjs-protractor-practice-site/
Before starting, please go through the links mentioned above and feel free to use these components.
If you find any bug or face any issue in the website, please send us an email at [email protected]. We will certainly take it on priority. In case, you want to us to add more things or want to share feedback, do write us.
This post is just to help Software Engineers in India to forward their resumes to HR of Top IT Companies. As you all know that we always have to login to Job Portals like Naukri, Monster, shine etc to apply to jobs and wait for companies call. Million of users are registered on these portals. When thousands of people apply to one job. There are high chances of getting your job application ignored by HR. HR also visit to these portals and filter candidate based on some skills, exp, location etc. You might be lucky one if your resume is updated and coming on the top in their filter.
Keeping all above factors in mind, we have created a list of HR Email ids. Now, you can forward your resumes directly to HR Email Ids. We couldn’t provide a list here. So, we have created an automated process. Just complete the form by clicking here and you will receive an email in few mins with Email Ids. Help us to improve our post by leaving a comment.
In case, you don’t receive an email in 15 mins. Please send us an email at [email protected]
NOTE : GlobalSQA doesn’t give any assurance of job openings in the company associated with Email Ids being shared.