Question Set 17

Q 11) What is a framework?

Answer: A framework is a set of the structure of the entire automation suite. It is also a guideline, which if followed can result in a structure which is easy to maintain and enhance.

These guidelines include:

·         Coding standards

·         Handling the test data

·         Maintaining and handling the elements (object repository in QTP)

·         Handling of environment files and properties file

·         Reporting of data

·         Handling logs

Q 12) What are the attributes of a good framework?

Answer: The characteristics include:

·         Modular – The framework should be adaptable to change. Testers should be able to modify the scripts as per the environment or login information change.

·         Reusable – The commonly used methods or utilities should be written in a common file which is accessible to all the scripts.

·         Consistent – The suite should be written in a consistent format by following all the accepted coding practices.

·         Independent – The scripts should be written in such a way that they are independent of each other. In case one test fails, it should not hold back the remaining test cases (unless it is a login page)

·         Logger – It is good to have implemented the logging feature in the framework. This would help in case our scripts run for longer hours (say nightly mode), if the script fails at any point of time, having the log file will help us to detect the location along with the type of the error.

·         Reporting – It is good to have the reporting feature automatically embedded into the framework. Once the scripting is done, we can have the results and reports sent via email.

·         Integration – Automation framework should be such that it is easy to integrate with other application like continuous integration or triggering the automated script as soon as the build is deployed.

Q 13) Can you do without a framework?

Answer: Frameworks are guidelines and not mandatory rules, so we can do without a framework, but if we create it and follow it, enhancing and maintaining would be easy to implement.

Q 14) What are the different types of an automation tool that you are aware of?

Answer: Open source tool like Selenium, JMeter etc.

Paid tools like QTP, Load Runner, Ranorex, RFT, and Rational Robot.

Q 15) What generally is the structure of a framework?

Answer: Normally the structure should have – (It would differ from project to project)

·         A “src” (source) folder having the actual test scripts.

·         A”lib” (library) folder having all the libraries and common methods.

·         A “class” folder having all the class file (in-case using java).

·         A “log” folder having the log file(s).

·         A file/folder having all the web element Ids.

·         A file containing the URL, environment and login information.

Q 16) Where will you maintain information like URL, login, password?

Answer: This information should always be maintained in a separate file.

Q 17) Why do you want to keep this kind of information in a separate file and not directly in the code?

Answer: URL, Login, and passwords are the kind of fields which are used very often and these change as per the environment and authorization. In case we hardcode it into our code, we have to change it in every file which has its reference.

In case if there are more than 100 files, then it becomes very difficult to change all the 100 files and this, in turn, can lead to errors. So this kind of information is maintained in a separate file so that updating becomes easy.

Q 18) What are the different types of frameworks?

Answer: Different types of the framework include:

·         Keyword-driven framework

·         Data-Driven framework

·         Hybrid Framework

·         Linear Scripting

Q #19) Can you tell some good coding practices while automation?

Answer: Some of the good coding practices include:

·         Add appropriate comments.

·         Identify the reusable methods and write it in a separate file.

·         Follow the language-specific coding conventions.

·         Maintain the test data in a separate file.

·         Run your scripts regularly.

Q 20) Any kind of test which you think should not be automated?

Answer:

·         Tests which are seldom executed.

·         Exploratory testing

·         Usability testing

·         Test which is executed quickly when done manually.

Related Posts

Comments are closed.

© 2024 Mechanical Engineering - Theme by WPEnjoy · Powered by WordPress