Why Log4j is better than System.Out.Println? (What is difference between log4j and common loggings?)

   Log4j is a logging framework, it is used as standard logger nowadays compared to System.out.println.
       Log4j has certainly various advantages over System.out.println,  firstly being checking the output the system.out.println outputs to standard output which is mostly a console window whereas the output from Log4j can be to the console or email server, database table or a log file.
Additionally, in Log4j different levels of logging can be set such as TRACE, DEBUG, INFO, WARN, ERROR and FATAL. If a log level is set messages will be logged for that level and level below it.
   Log4j allows logging on class-by-class basis i.e., each class can be covered whereas System.out.println can be controlled at application level. Through Log4j we can turn on or off the logging at runtime by changing the configuration file.
The Main Reasons why Log4j is better than system.out.println() –
•  There are various levels of logging i.e all, trace, debug, info, warn, error and fatal. You can log at whatever you want in production as compared to println that can only print logs on the console. In log4j you can change the granularity of logging based on your requirement.
•  Logging can be controlled at runtime using the configuration file as compared to println that requires a compilation and code deployment.
•  You can target logs as per your convenience, you can keep them in log files. Later you can archive these log files where as println prints out on console and you may get “Out of memory” on buffers.
•  Loggers are usually optimized for speed.
•  Logging support internationalization
•  Log4j allows you to print the logs at multiple locations. Not only that it allows you to print out the logs asynchronously. log4j allows you to define your own writing strategy.
•  Using log4j you can specify the output format of logs. You can define your own conversion pattern. It allows you to include all the required information you want in your logs in the required pattern.

Hope this helps —

 Why do we need logging in Java / Selenium?

Log4j is a logging framework, it is used as standard logger nowadays, as compared to System.out.println.
Log4j has certainly various advantages over System.out.println firstly being checking the output, the outputs to standard output which is mostly a console window whereas the output from Log4j can be to the console or email server, database table or a log file.
Additionally, in Log4j different levels of logging can be set such as TRACE, DEBUG, INFO, WARN, ERROR and FATAL. If a log level is set messages will be logged for that level and level below it.
Log4j allows logging on class-by-class basis i.e., each class can be covered whereas System.out.println can be controlled at application level. Though Log4j we can turn on or off the logging at runtime by changing the configuration file.
         Everybody who starts java starts with System.out.println() for printing message in java console. But this is not at all powerful as compared to advanced Java logging API like log4j and java.util.logging. If you are writing a java application server then only way to know what your server is doing is by seeing log file of your server. 
        suppose you don’t write anything in your java log file then nobody knows what your sever is doing, it becomes increasingly important if your application is connected to upstream and downstream like in many stock trading systems or electronic trading system and get input from upstream, transforms and normalize it and send down to downstream. In case of any issue without java logs you won’t be able to figure out what went wrong. That’s why logging in java is most important while writing any Java server application. Logging in Java is not by choice it’s must to understand.

Following are the Pros and Cons of Logging −

>  Logging is an important component of the software development. A well-written logging code offers quick debugging, easy maintenance, and structured storage of an application’s runtime information.
>  Logging does have its drawbacks also. It can slow down an application. If too verbose, it can cause scrolling blindness. To alleviate these concerns, log4j is designed to be reliable, fast and extensible.

> Since logging is rarely the main focus of an application, the log4j API strives to be simple to understand and to use

Does certification courses are necessary for software testing?

Testing Certificates do not prove that someone can test. They only prove that the individual can pass the certification exam.
According to my experience does not matter whether you certified or not. The knowledge and experience is important you have.

I believe that certifications do not provide the actual required learning and practical knowledge to the software testing professionals. Due to the certain format of Multiple Choice Questions, Syllabus, and exam dumps, there is hardly any chance that a professional would learn something out of it or polish his/her skill set. 
I also believe that if you really wish to learn something, then start experimenting, write about your experiences, and take part in active discussion. Be fearless with your opinion, and keep re-learning stuff. You can also watch videos of different testing conferences, read books, and follow twitter updates of international testing gurus, conferences, meetups, and companies. 
But, I should write with capitals letter this but, these certifications do not give you knowledge, experience and humility which is required in the testing world. They are not equivalent with the willing to learn attitude.
Here is another aspect of having certifications. You will be in focus. There will be people who watching you as a example.
Certification does not prove that someone knows how to test. They can show that you have learned a set of “common” terms and idea’s. They may even teach someone some of the basics of testing, however, really good testing can only be learned through experience, practice, and personal retrospectives as to what they actually learned while they were testing.
If you want to put the time and money into them, I certainly wouldn’t begrudge you for having them if I happened to be interviewing you, I’ve often contemplated the same thing myself. There are managers however, who feel that certification is a requirement. In this case, if you are in a very competitive market, it could very well help give you a one up over another candidate.

HP Quality Center certification – HP0-M46 / HP0-M97

HP Quality Center is used as a complete application lifecycle management tool and it is one of the most widely used test management tools in the market. Quality Center runs as a web based GUI. To get the certificate for QC, following exams are applicable.
  1. HP AIS: Application Lifecycle Management v11, HP0-M46 HP Application Lifecycle Management 11.x Software
  2. HP ASE – Application Lifecycle Management Implementations v11, HP0-M97 Advanced ALM Quality Center 11 Software
AIS – Full Form as “Accredited Integration Specialist”.
ASE – Full Form as “Accredited Systems Engineer”.
AIS Certification Exams: These are Test Center exams. They are conducted in a Prometric Test Center. Prometric is the global leader providing testing & assessment services & conducts the AIS certification exams on behalf of HP, being their partner.
ASE Certification Exams:These are proctored, performance-based exams. These exams are conducted in HP performance-based test centers throughout the world. During the performance, based exam, you will be provided with a virtual lab environment wherein the concerned software alongwith a sample application shall be provided to perform activities referred by exam questions.
Syllabus for QC certification: 
1: Introduction to HP Quality Center.
2: Release Management Module.
3: Test Plan Module.
4: Test Lab Module.
5: Defect Management Module.
6: Reports Module.

How to enroll for QC 11 certification?

Here are the steps you can follow to register for HP Application Lifecycle Management 11.x Software. Code for this exam is HP0-M46.

With effect from Feb 1st, 2012 HP certification exams are conducted by Pearson VUE. You need to apply for HP learner ID here. Once you have the Learner ID, you can then proceed to create your user profile at Pearson VUE.
Exams can be purchased using credit cards/PayPal or Wire transfer. The country specific price list can be found here.

HP0-M47 Dumps – HP Functional Testing 11.x. Software Exam Dumps

Different software development life cycle models

Well, the term “models” comes up a lot in software development in a variety of different contexts.

The ones you mention are specifically to do with what’s commonly called the software development “life cycle”. As the name suggests, that refers to the process used to create a piece of software over time – in what order and in what way it’s specified, designed, built, tested, maintained, so on. “Models” in this context are a particular overall structure for that life cycle, given a descriptive name. E.g. as the name “waterfall” might suggest, under that particular model you move through a set of steps in a linear sequence.

Different software development life cycle models are –

       a. Waterfall Model
       b. V model
       c. Incremental Model
       d. RAD Model
       e. Agile Model 

V Model in Software Testing

V-Model is the modern day Software Development Life cycle Model in which there is two directional flow, i.e. any process can be traversed back. It is so far the best SDLC model for creating any software product. 
Requirement-><-Specification-><-Global Design-> <-Detailed Design -><-Code-><-Unit Testing-><-Integration Testing-><-System Testing-><-Acceptance Testing.
V- model means Verification and Validation model. Just like the waterfall model, the V-Shaped life cycle is a sequential path of execution of processes. Each phase must be completed before the next phase begins.  Testing of the product is planned in parallel with a corresponding phase of development.

In V-Model Application/product development phase and testing phase occurs/starts at the same time, it reduces the time to be spent on testing and the most important part is, it is cost effective in terms of building a right product.
 
I will explain only about the validation part of the V-Model which is of testing phases.
 
Requirement analysis : During this phase, UAT test cases are prepared for the business requirements that are going to be developed.
 
System requirements/high level design : System level test cases are written( Some clients require Test approach which says how and what needs to be tested)
 
Architectural design : from the high level design, system’s architecture will be built/created(relationship of databases, application, architectural diagrams are finalized). integration(Component) test cases are written in this phase.
 
Module/Low level design : unit/module level test cases are written.
 
Code implementation : In this Phase, Functional test cases(Technically, System testing cases) are written and will be reviewed before the code migration to QA environment to avoid irrelevant test cases that will eat out the testing time, to add missed out requirements, improving the test case quality (TC review order : Peer-review(within your testing team) , External review(developers, Product management))
 
Once the CODE is ready, We start from the end ! Yes, Unit testing(developers in Dev/test environment before the code migration to QA) – Integration/Component testing(developers/support in QA environment)- Functional/System testing(Testers in QA)- Acceptance testing( Alpha by vendors, Beta by end user).
 
Comparison with Waterfall model : 
 
(only on Testing perspective )
 
* All the test plans and test case preparation occurs once the code is ready, Which means after the entire 5 phases of development phases.
 
*For a larger project where it requires N months/years of test plan and test case preparation, in V-model, we save more time. And also, Testers will get adequate time to understand the requirements/systems.
 
*Of course, The cost will be minimal in terms of defect fix.
 
*Product/application would be launched faster than the products being tested in waterfall model.
 
Jumping in to the actual question: In short, do not get confused with the connection between requirement analysis and the acceptance testing. it just a mapping of business requirements will be tested in acceptance, prior to rest of the development phases, user acceptance test plan and test case will be created since the end user(client) knows what he/she wants and there is no need of awaiting the whole system to be built to document what he/she is going to check on the application /system.

Next Topic: Agile Model

Waterfall model in Software Development

Waterfall model in software engineering means that:

Stages of development are following each other in certain order. And after each stage there is no going back to change something or fix. All the requirements must be defined initially.

Waterfall has its advantages – you can easily estimate beforehand your employees’ labor hours, your budget and release data. But waterfall model appeared long time ago, not in IT sphere, it was manufacturing methodology. And it remains the same.

Stages of Waterfall model – 

  1. Requirements analysis
  2. Design
  3. Development (Implementation)
  4. Testing (Verification)
  5. Launch (deploy & Maintenance)
And often you are not able to fix problems detected on previous stage. What if you’ll discover a major dev’s or design bug on the testing stage? It would be impossible to improve anything. And of course, you’ll have to review your budget and estimated plan, delay launch. This is a huge disadvantage of Waterfall.
Waterfall projects value:
  • Processes and tools over Individuals and interactions;
  • Comprehensive documentation over working products;
  • Contract negotiation over customer collaboration;
  • Following a plan over responding to change.
People who like the waterfall model call it a sequential stage gated system engineering process. People who don’t like it call it waterfall.
In a pure Waterfall model, there are typically required deliverables at the end of each phase that are heavily documentation-intensive that must be reviewed and approved before transitioning to the next phase. The definition of the phases is not prescribed; however the phases are typically something like requirements definition, design, development, test, acceptance, and deployment.
The Waterfall model has some significant potential flaws that even Dr. Royce recognized when he created it that have caused many people to adopt a more Agile approach over the past 10-15 years. Some of the more significant flaws are:
• It doesn’t work well in environments where there is a high-level of uncertainty because the emphasis on control creates a relatively inflexible approach that is not easily changed
• It has a lot of overhead because it is so documentation-intensive and has a lot of emphasis on control
• Because it is a long sequential process, any problems in the requirements may not be discovered until the very end of the project and by that time, it may be too late to make corrections
The Waterfall model is still useful in some industries and application areas such as construction where the requirements are relatively stable and predictability of costs and schedules is important.

Next Topic: V model

What are the basic requirements for software testing?

Software testing is not an activity to take up when the product is ready. An effective Software Testing begins with a proper plan from the user requirements stage itself. Software testability is the ease with which a computer program is tested. Metrics can be used to measure the testability of a product. The requirements for effective Software Testing are given in the following sub-sections.
Operability in Software Testing:
 1. The better the software works, the more efficiently it can be tested.
 2. The system has few bugs (bugs add analysis and reporting overhead to the test process)
 3. No bugs block the execution of tests.
 4. The product evolves in functional stages (allows simultaneous development & testing)
Observability in Software Testing:
 1. What is seen is what is tested
 2. Distinct output is generated for each input
 3. System states and variables are visible or queriable during execution
 4. Past system states and variables are visible or queriable (eg., transaction logs)
 5. All factors affecting the output are visible
 6. Incorrect output is easily identified
 7. Incorrect input is easily identified
 8. Internal errors are automatically detected through self-testing mechanism
 9. Internally errors are automatically reported
 10. Source code is accessible
Controllability in Software Testing:
 1. The better the software is controlled, the more the testing can be automated and optimized.
  2. All possible outputs can be generated through some combination of input in Software Testing
 3. All code is executable through some combination of input in Software Testing
 4. Software and hardware states can be controlled directly by testing
 5. Input and output formats are consistent and structured in Software Testing
 6. Tests can be conveniently specified, automated, and reproduced.
Decomposability in Software Testing:
 1. By controlling the scope of testing, problems can be isolated quickly, and smarter testing can be performed.
  2. The software system is built from independent modules
 3. Software modules can be tested independently in Software Testing
Simplicity in Software Testing:
 1. The less there is to test, the more quickly it can be tested in Software Testing
 2. Functional simplicity
 3. Structural simplicity
 4. Code simplicity
Stability in Software Testing:
 1. The fewer the changes, the fewer the disruptions to testing
 2. Changes to the software are infrequent
 3. Changes to the software are controlled in Software Testing
 4. Changes to the software do not invalidate existing tests in Software Testing
 5. The software recovers well from failures in Software Testing
Understandability in Software Testing:
 1. The more information we have, the smarter we will test
 2. The design is well understood in Software Testing
 3. Dependencies between internal external and shared components are well understood.
 4. Changes to the design are communicated.
 5. Technical documentation is instantly accessible
 6. Technical documentation is well organized in Software Testing
 7. Technical documentation is specific and detailed
 8. Technical documentation is accurate

Next Topic: Good testing practices

What is difference between Verification & validation?

Validation and Verification process continue in a cycle till the software becomes defects free.
Let’s understand the difference between verification & validation here with points.
Verification:
1. Verification is a static practice of verifying documents, design, code and program.
2. It does not involve executing the code.
3. It is human based checking of documents and files.
4. Verification uses methods like inspections, reviews, walkthroughs, and Desk-checking etc.
5. Verification is to check whether the software conforms to specifications
6. It can catch errors that validation cannot catch. It is low level exercise
7. Target is requirements specification, application and software architecture, high level, complete design, and database design etc.
8. Verification is done by QA team to ensure that the software is as per the specifications in the SRS document.
9. It generally comes first-done before validation.
Validation:
1. Validation is a dynamic mechanism of validating and testing the actual product
2. It always involves executing the code.
3. It is computer based execution of program.
4. Validation uses methods like black box (functional)  testing, gray box testing, and white box (structural) testing etc.
5. Validation is to check whether software meets the customer expectations and requirements.
6. It can catch errors that verification cannot catch. It is High Level Exercise.
7. Target is actual product-a unit, a module, a bent of integrated modules, and effective final product.
8. Validation is carried out with the involvement of testing team.
9. It generally follows after verification.
Example of verification and validation are explained below:-
Suppose we have the specifications related to the project than by checking that specifications without executing to see whether the specifications are up to the mark or not is what we have done in verification.
Similarly Validation of the software is done to make sure that the software always meets the requirements of the customer by executing the specifications of the project and product.
Note that the customer and end users are concerned in validation of the software.
It is also crucial to differentiate between end users, and customers. Considering example, if you are developing a library monitoring system, the librarian is the client and the person who issue the books, collect fines etc. are comes under the category of the end users.
Techniques or Methods of Verification and Validation
Methods of Verification
1. Walkthrough
2. Inspection
3. Review
Methods of Validation
1. Testing
2. End Users
Lots of people use verification and validation interchangeably but both have different meanings.

Verification process describes whether the outputs are according to inputs or not, and

Validation process describes whether the software is accepted by the user or not.

Next Topic: Basic requirements for software testing