Sie sind auf Seite 1von 38

TCL Question Answer - mullais

1 of 38

https://sites.google.com/site/mullais/logic/tool-command-language--tcl/tc...

mullais

Navigation

logic > Tool Command Language [TCL] >

Mullaiselvan . M

TCL Question Answer

Sitemap

Recent site activity

WHAT IS TCL?

2016
edited by Mullaiselvan
Mohan

Tcl (Tool Command Language from Sun Microsystems) is a very powerful but easy

VPN External IP
address test

including web and desktop applications, networking, administration, testing and

edited by Mullaiselvan
Mohan
attachment from
Mullaiselvan Mohan

language that is truly cross platform(windos,all flavors of linux,macintosh), easily

Trace route

to learn dynamic programming language, suitable for a very wide range of uses,
many more. Open source and business-friendly, Tcl is a mature yet evolving
deployed and highly extensible.
Developer :Ousterhout

edited by Mullaiselvan
Mohan

Webpages Test using


urllib
edited by Mullaiselvan
Mohan

2016
edited by Mullaiselvan
Mohan

View All

How to Swap 30 & 40 in IP address 192.30.40.1 using TCL script?


There are three solutions.
set a 192.30.40.1
set b [ string range $a 3 4 ]
set c [ string range $a 6 7 ]
set d [ string replace $a 3 4 $c ]
set e [ string replace $d 6 7 $b]
puts $e
#=====OR=====
set a 192.30.40.1
set b [ split $a .]
set u [lindex $b 0]
set v [lindex $b 3]
set x [lindex $b 1]

8/25/2016 8:15 PM

TCL Question Answer - mullais

2 of 38

https://sites.google.com/site/mullais/logic/tool-command-language--tcl/tc...

set y [lindex $b 2]
set z [join "$u $y $x $v" .]
puts $z
#====OR======
set ip 192.30.40.1
regexp {([0-9]+\.)([0-9]+\.)([0-9]+\.)([0-9]+)} $ip match 1st 2nd 3rd 4th
append newIp $1st $3rd $2nd $4th
puts $newIp
How do you find the length of a string without using string length command in
TCL??
set str "lenghtofthisstring"; set len 0
set list1 [ split $str "" ]
foreach value $list1 {
incr len
}
puts $len
#======OR======
set str "lenghtofthisstring"
puts [llength [ split $str "" ]]

How do you check whether a string is palindrome or not using TCL script?
#gets stdin a
set a malayalam
set len [ string length $a ]
set n [ expr $len/2 ]
for { set i 0 } { $i < $n } { incr i 1 } {
set b [ string index $a $i ]
set c [ expr $len - 1 - $i ]
set d [ string index $a $c ]
if {$b != $d} {
puts "not a palindrome"
exit
}
}
puts "Palindrome"
#======OR======

8/25/2016 8:15 PM

TCL Question Answer - mullais

3 of 38

https://sites.google.com/site/mullais/logic/tool-command-language--tcl/tc...

#gets stdin a
set a madam
set len [ string length $a ]
set n [ expr $len/2 ]
for { set i 0 } { $i < $n } { incr i 1 } {
set b [ string index $a $i ]
set c [ expr $len - 1 - $i ]
set d [ string index $a $c ]
if {$b != $d} {
puts "not a palindrome"
exit
}
}
puts "Palindrome"

Set ip address as 10.30.20.1 write a script to replace the 30 with 40 ?


set ip 10.30.20.1
regsub -all {30} $ip {40} ip
puts $ip
#========OR===============
set a 10.30.2.1
set b [ string replace $a 3 4 40 ]
puts $b
-------------------------------------------------------------------------------Test Automation:
1. What automating testing tools are you familiar with?
2. How did you use automating testing tools in your job?
3. Describe some problem that you had with automating testing tool.
4. How do you plan test automation?
5. Can test automation improve test effectiveness?
6. What is data - driven automation?
7. What are the main attributes of test automation?
8. Does automation replace manual testing?
9. How will you choose a tool for test automation?

8/25/2016 8:15 PM

TCL Question Answer - mullais

4 of 38

https://sites.google.com/site/mullais/logic/tool-command-language--tcl/tc...

10. How you will evaluate the tool for test automation?
11. What are main benefits of test automation?
12. What could go wrong with test automation?
13. How you will describe testing activities?
14. What testing activities you may want to automate?
15. Describe common problems of test automation.
16. What types of scripting techniques for test automation do you know?
17. What are principles of good testing scripts for automation?
18. What tools are available for support of testing during software development life
cycle?
19. Can the activities of test case design be automated?
20. What are the limitations of automating software testing?
21. What skills needed to be a good test automaton?
22. How to find that tools work well with your existing system?
23.Describe some problem that you had with automating testing tool.
24.What are the main attributes of test automation?
25.What testing activities you may want to automate in a project?
26.How to find that tools work well with your existing system?
-------------------------------------------------------------------------------Load Testing:
1.What criteria would you use to select Web transactions for load testing?
2.For what purpose are virtual users created?
3.Why it is recommended to add verification checks to your all your scenarios?
4.In what situation would you want to parameterize a text verification check?
5.Why do you need to parameterize fields in your virtual user script?
6.What are the reasons why parameterization is necessary when load testing the
Web server and the database server?
7.How can data caching have a negative effect on load testing results?
8.What usually indicates that your virtual user script has dynamic data that is

8/25/2016 8:15 PM

TCL Question Answer - mullais

5 of 38

https://sites.google.com/site/mullais/logic/tool-command-language--tcl/tc...

dependent on you parameterized fields?


9.What are the benefits of creating multiple actions within any virtual user script?
-------------------------------------------------------------------------------General questions:
1. What types of documents would you need for QA, QC, and Testing?
2. What did you include in a test plan?
3. Describe any bug you remember.
4. What is the purpose of the testing?
5. What do you like (not like) in this job?
6. What is quality assurance?
7. What is the difference between QA and testing?
8. How do you scope, organize, and execute a test project?
9. What is the role of QA in a development project?
10. What is the role of QA in a company that produces software?
11. Define quality for me as you understand it
12. Describe to me the difference between validation and verification.
13. Describe to me what you see as a process. Not a particular process, just the
basics of having a process.
14. Describe to me when you would consider employing a failure mode and effect
analysis.
15. Describe to me the Software Development Life Cycle as you would define it.
16. What are the properties of a good requirement?
17. How do you differentiate the roles of Quality Assurance Manager and Project
Manager?
18. Tell me about any quality efforts you have overseen or implemented. Describe
some of the challenges you faced and how you overcame them.
19. How do you deal with environments that are hostile to quality change efforts?
20. In general, how do you see automation fitting into the overall process of
testing?
21. How do you promote the concept of phase containment and defect prevention?

8/25/2016 8:15 PM

TCL Question Answer - mullais

6 of 38

https://sites.google.com/site/mullais/logic/tool-command-language--tcl/tc...

22. If you come on-board, give me a general idea of what your first overall tasks
will be as far as starting a quality effort.
23. What kinds of testing have you done?
24. Have you ever created a test plan?
25. Have you ever written test cases or did you just execute those written by
others?
26. What did your base your test cases?
27. How do you determine what to test?
28. How do you decide when you have 'tested enough?'
29. How do you test if you have minimal or no documentation about the product?
30. Describe me to the basic elements you put in a defect report?
31. How do you perform regression testing?
32. At what stage of the life cycle does testing begin in your opinion?
33. How do you analyze your test results? What metrics do you try to provide?
34. Realising you won't be able to test everything - how do you decide what to test
first?
35. Where do you get your expected results?
36. If automating - what is your process for determining what to automate and in
what order?
37. In the past, I have been asked to verbally start mapping out a test plan for a
common situation, such as an ATM. The interviewer might say, "Just thinking out
loud, if you were tasked to test an ATM, what items might you test plan include?"
These type questions are not meant to be answered conclusively, but it is a good
way for the interviewer to see how you approach the task.
38. If you're given a program that will average student grades, what kinds of inputs
would you use?
39. Tell me about the best bug you ever found.
40. What made you pick testing over another career?
41. What is the exact difference between Integration & System testing, give me
examples with your project.
42. How did you go about testing a project?
43. When should testing start in a project? Why?

8/25/2016 8:15 PM

TCL Question Answer - mullais

7 of 38

https://sites.google.com/site/mullais/logic/tool-command-language--tcl/tc...

44. How do you go about testing a web application?


45. Difference between Black & White box testing
46. What is Configuration management? Tools used?
47. What do you plan to become after say 2-5yrs (Ex: QA Manager, Why?)
48. Would you like to work in a team or alone, why?
49. Give me 5 strong & weak points of yours
50. Why do you want to join our company?
51. When should testing be stopped?
52. What sort of things would you put down in a bug report?
53. Who in the company is responsible for Quality?
54. Who defines quality?
55. What is an equivalence class?
56. Is a "A fast database retrieval rate" a testable requirement?
57. Should we test every possible combination/scenario for a program?
58. What criteria do you use when determining when to automate a test or leave it
manual?
59. When do you start developing your automation tests?
60. Discuss what test metrics you feel are important to publish an organization?
61. In case anybody cares, here are the questions that I will be asking:
62. Describe the role that QA plays in the software lifecycle.
63. What should Development require of QA?
64. What should QA require of Development?
65. How would you define a "bug?"
66. Give me an example of the best and worst experiences you've had with QA.
67. How does unit testing play a role in the development / software lifecycle?
68. Explain some techniques for developing software components with respect to
testability.
69. Describe a past experience with implementing a test harness in the
development of software.

8/25/2016 8:15 PM

TCL Question Answer - mullais

8 of 38

https://sites.google.com/site/mullais/logic/tool-command-language--tcl/tc...

70. Have you ever worked with QA in developing test tools? Explain the
participation Development should have with QA in leveraging such test tools for
QA use.
71. Give me some examples of how you have participated in Integration Testing.
72. How would you describe the involvement you have had with the bug-fix cycle
between Development and QA?
72. What is unit testing?
73. Describe your personal software development process.
74. How do you know when your code has met specifications?
75. How do you know your code has met specifications when there are no
specifications?
76. Describe your experiences with code analyzers.
77. How do you feel about cyclomatic complexity?
78. Who should test your code?
79.How do you survive chaos?
80. What processes/methodologies are you familiar with?
81. What type of documents would you need for QA/QC/Testing?
82. How can you use technology to solve problem?
83. What type of metrics would you use?
84. How to find that tools work well with your existing system?
85. What automated tools are you familiar with?
86. How well you work with a team?
87. How would you ensure 100% coverage of testing?
88. How would you build a test team?
89. What problem you have right now or in the past? How you solved it?
90. What you will do during the first day of job?
91. What would you like to do five years from now?
92. Tell me about the worst boss you've ever had.
93. What are your greatest weaknesses?
94. What are your strengths?

8/25/2016 8:15 PM

TCL Question Answer - mullais

9 of 38

https://sites.google.com/site/mullais/logic/tool-command-language--tcl/tc...

95. What is a successful product?


96. What do you like about Windows?
97. What is good code?
98. Who is Kent Beck, Dr Grace Hopper, Dennis Ritchie?
99. What are basic, core, practices for a QA specialist?
100. What do you like about QA?
101. What has not worked well in your previous QA experience and what would you
change?
102. How you will begin to improve the QA process?
103. What is the difference between QA and QC?
104. What is UML and how to use it for testing?
105. What is CMM and CMMI? What is the difference?
106. What do you like about computers?
107. Do you have a favorite QA book? More than one? Which ones? And why.
108. What is the responsibility of programmers vs QA?
109.What are the properties of a good requirement?
110.Ho to do test if we have minimal or no documentation about the product?
111.What are all the basic elements in a defect report?
112.Is an "A fast database retrieval rate" a testable requirement?
-------------------------------------------------------------------------------From Cem Kaner article: "Recruiting testers" December 1999
1. What is software quality assurance?
2. What is the value of a testing group? How do you justify your work and budget?
3. What is the role of the test group vis-is documentation, tech support, and so
forth?
4. How much interaction with users should testers have, and why?
5. How should you learn about problems discovered in the field, and what should
you learn from those problems?
6. What are the roles of glass-box and black-box testing tools?

8/25/2016 8:15 PM

TCL Question Answer - mullais

10 of 38

https://sites.google.com/site/mullais/logic/tool-command-language--tcl/tc...

7. What issues come up in test automation, and how do you manage them?
8. What development model should programmers and the test group use?
9. How do you get programmers to build testability support into their code?
10. What is the role of a bug tracking system?
11. What are the key challenges of testing?
12. Have you ever completely tested any part of a product? How?
13. Have you done exploratory or specification-driven testing?
14. Should every business test its software the same way?
15. Discuss the economics of automation and the role of metrics in testing.
16. Describe components of a typical test plan, such as tools for interactive
products and for database products, as well as cause-and-effect graphs and
data-flow diagrams.
17. When have you had to focus on data integrity?
18. What are some of the typical bugs you encountered in your last assignment?
19. How do you prioritize testing tasks within a project?
20. How do you develop a test plan and schedule? Describe bottom-up and
top-down approaches.
21. When should you begin test planning?
22. When should you begin testing?
23. Do you know of metrics that help you estimate the size of the testing effort?
24. How do you scope out the size of the testing effort?
25. How many hours a week should a tester work?
26. How should your staff be managed? How about your overtime?
27. How do you estimate staff requirements?
28. What do you do (with the project tasks) when the schedule fails?
29. How do you handle conflict with programmers?
30. How do you know when the product is tested well enough?
31. What characteristics would you seek in a candidate for test-group manager?
32. What do you think the role of test-group manager should be? Relative to senior
management?

8/25/2016 8:15 PM

TCL Question Answer - mullais

11 of 38

https://sites.google.com/site/mullais/logic/tool-command-language--tcl/tc...

Relative to other technical groups in the company? Relative to your staff?


33. How do your characteristics compare to the profile of the ideal manager that
you just described?
34. How does your preferred work style work with the ideal test-manager role that
you just described? What is different between the way you work and the role you
described?
35. Who should you hire in a testing group and why?
36. What is the role of metrics in comparing staff performance in human resources
management?
37. How do you estimate staff requirements?
38. What do you do (with the project staff) when the schedule fails?
39. Describe some staff conflicts youve handled.
Here are some questions you might be asked on a job interview for a testing
opening: (from MU COSC 198 Software Testing by Dr. Corliss)
Why did you ever become involved in QA/testing?
What is the testing lifecycle and explain each of its phases?
What is the difference between testing and Quality Assurance?
What is Negative testing?
What was a problem you had in your previous assignment (testing if possible)? How
did you resolve it?
What are two of your strengths that you will bring to our QA/testing team?
How would you define Quality Assurance?
What do you like most about Quality Assurance/Testing?
What do you like least about Quality Assurance/Testing?
What is the Waterfall Development Method and do you agree with all the steps?
What is the V-Model Development Method and do you agree with this model?
What is the Capability Maturity Model (CMM)? At what CMM level were the last few
companies you worked?
What is a "Good Tester"?
Could you tell me two things you did in your previous assignment (QA/Testing
related hopefully) that you are proud of?

8/25/2016 8:15 PM

TCL Question Answer - mullais

12 of 38

https://sites.google.com/site/mullais/logic/tool-command-language--tcl/tc...

List 5 words that best describe your strengths.


What are two of your weaknesses?
What methodologies have you used to develop test cases?
In an application currently in production, one module of code is being modified. Is
it necessary to re- test the whole application or is it enough to just test
functionality associated with that module?
Define each of the following and explain how each relates to the other: Unit,
System, and Integration testing.
Define Verification and Validation. Explain the differences between the two.
Explain the differences between White-box, Gray-box, and Black-box testing.
How do you go about going into a new organization? How do you assimilate?
Define the following and explain their usefulness: Change Management,
Configuration Management, Version Control, and Defect Tracking.
What is ISO 9000? Have you ever been in an ISO shop?
When are you done testing?
What is the difference between a test strategy and a test plan?
What is ISO 9003? Why is it important
What are ISO standards? Why are they important?
What is IEEE 829? (This standard is important for Software Test
Documentation-Why?)
What is IEEE? Why is it important?
Do you support automated testing? Why?
We have a testing assignment that is time-driven. Do you think automated tests are
the best solution?
What is your experience with change control? Our development team has only 10
members. Do you think managing change is such a big deal for us?
Are reusable test cases a big plus of automated testing and explain why.
Can you build a good audit trail using Compuware's QACenter products. Explain
why.
How important is Change Management in today's computing environments?
Do you think tools are required for managing change. Explain and please list some
tools/practices which can help you managing change.

8/25/2016 8:15 PM

TCL Question Answer - mullais

13 of 38

https://sites.google.com/site/mullais/logic/tool-command-language--tcl/tc...

We believe in ad-hoc software processes for projects. Do you agree with this?
Please explain your answer.
When is a good time for system testing?
Are regression tests required or do you feel there is a better use for resources?
Our software designers use UML for modeling applications. Based on their use
cases, we would like to plan a test strategy. Do you agree with this approach or
would this mean more effort for the testers.
Tell me about a difficult time you had at work and how you worked through it.
Give me an example of something you tried at work but did not work out so you
had to go at things another way.
How can one file compare future dated output files from a program which has
change, against the baseline run which used current date for input. The client does
not want to mask dates on the output files to allow compares. - Answer-Rerun
baseline and future date input files same # of days as future dated run of program
with change. Now run a file compare against the baseline future dated output and
the changed programs' future dated output.
Interviewing Suggestions
If you do not recognize a term ask for further definition. You may know the
methodology/term but you have used a different name for it.
Always keep in mind that the employer wants to know what you are going to do for
them, with that you should always stay/be positive.
Preinterview Questions
What is the structure of the company?
Who is going to do the interview-possible background information of interviewer?
What is the employer's environment (platforms, tools, etc.)?
What are the employer's methods and processes used in software arena?
What is the employer's philosophy?
What is the project all about you are interviewing for-as much information as
possible.
Any terminologies that the company may use.

---------------------------------------------------------------------------------------------------------------$ causes variable substitution.

8/25/2016 8:15 PM

TCL Question Answer - mullais

14 of 38

https://sites.google.com/site/mullais/logic/tool-command-language--tcl/tc...

[ ] causes command substitution.


" quotes white space and semi-colons.
Double-quotes disable word and command separators, while braces disable almost
all special characters.
Quoting with double-quotes: If a word is enclosed in , then spaces, tabs & ; are
treated as ordinary characters.
e.g. set msg "Eggs: \$2.18/dozen\nGasoline: \$1.49/gallon"
=> Eggs: $2.18/dozen
Gasoline: $1.49/gallon
Note: Within quotes all previous substitutions occurs as usual
Quoting with braces: Curly braces prevent breaks and substitutions. Braces provide
a more radical form of quoting where all the special characters lose their meaning.
If a word is enclosed in braces then the characters between the braces are the
value of the word, verbatim. No substitutions are performed on the word and
spaces, tabs, newlines, and semi-colons are treated as ordinary characters.
e.g. set msg {Eggs: $2.18/dozen\nGasoline: $1.49/gallon}
=> Eggs: $2.18/dozen\nGasoline: $1.49/gallon

---------------------------------------------------------------------------------------------------------------Procedures
If the last argument in the argument list has the special name args, procedure
takes varying number of arguments
If no extra arguments, args will be set to an empty string
Example:proc sum args {
set s 0
foreach n $args {
incr s $n
}
return $s
}

Here sum can be invoked with different number of arguments, as follows:


sum 1 2 3 4 5
=> 15

8/25/2016 8:15 PM

TCL Question Answer - mullais

15 of 38

https://sites.google.com/site/mullais/logic/tool-command-language--tcl/tc...

sum
=> 0
If the arguments before args are defaulted then there should not be an extra
argument, so args will be set to an empty string
No defaults can be specified for args (the empty string is the default)
---------------------------------------------------------------------------------------------------------------package require Tnm
namespace import Tnm::*
proc walk {} {
set handle [snmp generator -address localhost]
set var 1.2.1
set val 0
while {1} {
set var [snmp oid [$handle getnext $var]]
puts "$var\t[mib name $var]\t\t[snmp value [$handle get $var]]"
if {$val==$var} {
break
} else {
set val $var
}
}
}
#################AnOther way
proc awalk {} {
set handle [snmp generator -address localhost]
set var mib-2
set val 0
while {1} {

8/25/2016 8:15 PM

TCL Question Answer - mullais

https://sites.google.com/site/mullais/logic/tool-command-language--tcl/tc...

set var [snmp oid [$handle getnext $var]]


puts "$var\t[mib name $var]\t\t[snmp value [$handle get $var]]"
if {$val==$var} {
break
} else {
set val $var
}
}
}
########################Another way
proc mwalk {} {
set handle [snmp generator -address localhost]
set var mib-2
set val 0
while {![regexp "endOfMibView" $var]} {
set var [snmp oid [$handle getnext $var]]
puts "$var\t[mib name $var]\t\t[snmp value [$handle get $var]]"
if {$val==$var} {
break
} else {
set val $var
}
}
}

---------------------------------------------------------------------------------------------------------------What are the key challenges of testing?


Following are some challenges while testing software

16 of 38

8/25/2016 8:15 PM

TCL Question Answer - mullais

17 of 38

https://sites.google.com/site/mullais/logic/tool-command-language--tcl/tc...

1. Testing the Complete Application


2. Relationship with developers
3. Regression testing
4. Testing always under time constraint
5. Understanding the requirements
6. One test team under multiple projects
7. Testers focusing on finding easy bugs
8. Which tests to execute first?
9. Lack of skilled testers
10. Which tests to execute first?
11. Requirements are not freeze
12. Application is not testable
13. Lack of resources
14. Lack of Tools
15. Lack of Training
16. Miss-communication or No Communication
As a tester, we have some challenges which are very unique to our profession and
some challenges are more generic in nature.
Analytical Challenges - These challenges are not unique to our profession and most
of the professions require some degree of analytical skills. Analytic can be defined
as "Having the ability to analyze" or "Ability to divide into elements and principle",
given the nature of testing it is very important for testers to have good analytical
skills. Like any other skill, analytical skill can also be improved by practice.
Professional Challenges: Every profession has its own challenges. This section
explains the different challenges faced in this field and how you can overcome
them. These may be the interaction with the developer, attitude of
Management towards testing, identification of tools, their usage and training
interaction with the customers, acceptability and entry-exit criteria for the tests and
many more.
---------------------------------------------------------------------------------------------------------------What's Ad Hoc Testing?
A testing where the tester tries to break the software by randomly trying

8/25/2016 8:15 PM

TCL Question Answer - mullais

https://sites.google.com/site/mullais/logic/tool-command-language--tcl/tc...

functionality of software.

What's the Accessibility Testing?


Testing that determines if software will be usable by people with disabilities.

What's the Alpha Testing?


The Alpha Testing is conducted at the developer sites and in a controlled
environment by the end user of the software

What's the Beta Testing?


Testing the application after the installation at the client place

What is Component Testing?


Testing of individual software components (Unit Testing)

What's Compatibility Testing?


In Compatibility testing we can test that software is compatible with other elements
of system.

What is Concurrency Testing?


Multi-user testing geared towards determining the effects of accessing the same
application code, module or database records. Identifies and measures the level of
locking, deadlocking and use of single-threaded code and locking semaphores.

What is Conformance Testing?


The process of testing that an implementation conforms to the specification on
which it is based. Usually applied to testing conformance to a formal standard.

What is Context Driven Testing?


The context-driven school of software testing is flavor of Agile Testing that

18 of 38

8/25/2016 8:15 PM

TCL Question Answer - mullais

19 of 38

https://sites.google.com/site/mullais/logic/tool-command-language--tcl/tc...

advocates continuous and creative evaluation of testing opportunities in light of


the potential information revealed and the value of that information to the
organization right now.

What is Data Driven Testing?


Testing in which the action of a test case is parameterized by externally defined
data values, maintained as a file or spreadsheet. A common technique is in
Automated Testing.

What is Conversion Testing?


Testing of programs or procedures used to convert data from existing systems for
use in replacement systems.

What is Dependency Testing?


Examines an application's requirements for pre-existing software, initial states and
configuration in order to maintain proper functionality.

What is Depth Testing?


A test that exercises a feature of a product in full detail

What is Dynamic Testing?


Testing software through executing it. See also Static Testing.

What is Endurance Testing?


Checks for memory leaks or other problems that may occur with prolonged
execution.

What is End-to-End testing?


Testing a complete application environment in a situation that mimics real-world
use, such as interacting with a database, using network communications, or
interacting with other hardware, applications, or systems if appropriate.

8/25/2016 8:15 PM

TCL Question Answer - mullais

20 of 38

https://sites.google.com/site/mullais/logic/tool-command-language--tcl/tc...

What is Exhaustive Testing?


Testing which covers all combinations of input values and preconditions for an
element of the software under test.

What is Gorilla Testing?


Testing one particular module, functionality heavily

What is Installation Testing?


Confirms that the application under test recovers from expected or unexpected
events without loss of data or functionality. Events can include shortage of disk
space, unexpected loss of communication, or power out conditions.

What is Localization Testing?


This term refers to making software specifically designed for a specific locality.

What is Loop Testing?


A white box testing technique that exercises program loops.

What is Mutation Testing?


Mutation testing is a method for determining if a set of test data or test cases is
useful, by deliberately introducing various code changes ('bugs') and retesting with
the original test data/cases to determine if the 'bugs' are detected. Proper
implementation requires large computational resources

What is Monkey Testing?


Testing a system or an Application on the fly, i.e. just few tests here and there to
ensure the system or an application does not crash out.

What is Positive Testing?


Testing aimed at showing software works. Also known as "test to pass". See also
Negative Testing.

8/25/2016 8:15 PM

TCL Question Answer - mullais

21 of 38

https://sites.google.com/site/mullais/logic/tool-command-language--tcl/tc...

What is Negative Testing?


Testing aimed at showing software does not work. Also known as "test to fail". See
also Positive Testing.

What is Path Testing?


Testing in which all paths in the program source code are tested at least once

What is Performance Testing?


Testing conducted to evaluate the compliance of a system or component with
specified performance requirements. Often this is performed using an automated
test tool to simulate large number of users. Also known as "Load Testing".

What is Ramp Testing?


Continuously raising an input signal until the system breaks down.

What is Recovery Testing?


Confirms that the program recovers from expected or unexpected events without
loss of data or functionality. Events can include shortage of disk space, unexpected
loss of communication, or power out conditions.

What is the Re-testing testing?


Retesting- Again testing the functionality of the application.

What is the Regression testing?


Regression- Check that change in code have not effected the working functionality

What is Sanity Testing?


Brief test of major functional elements of a piece of software to determine if its
basically operational

8/25/2016 8:15 PM

TCL Question Answer - mullais

22 of 38

https://sites.google.com/site/mullais/logic/tool-command-language--tcl/tc...

What is Scalability Testing?


Performance testing focused on ensuring the application under test gracefully
handles increases in work load.

What is Security Testing?


Testing which confirms that the program can restrict access to authorized
personnel and that the authorized personnel can access the functions available to
their security level.

What is Stress Testing?


Stress testing is a form of testing that is used to determine the stability of a given
system or entity. It involves testing beyond normal operational capacity, often to a
breaking point, in order to observe the results.

What is Smoke Testing?


A quick-and-dirty test that the major functions of a piece of software work.
Originated in the hardware testing practice of turning on a new piece of hardware
for the first time and considering it a success if it does not catch on fire.

What is Soak Testing?


Running a system at high load for a prolonged period of time. For example,
running several times more transactions in an entire day (or night) than would be
expected in a busy day, to identify and performance problems that appear after a
large number of transactions have been executed.

What's the Usability testing?


Usability testing is for user friendliness.

What's the User acceptance testing?


User acceptance testing is determining if software is satisfactory to an end-user or
customer.

8/25/2016 8:15 PM

TCL Question Answer - mullais

23 of 38

https://sites.google.com/site/mullais/logic/tool-command-language--tcl/tc...

What's the Volume Testing?


We can perform the Volume testing, where the system is subjected to large volume
of data.
---------------------------------------------------------------------------------------------------------------Tell us about hash tables in TCL?
Network Regression Test
black box testing
Difference between Array and Pointer
Dangling Pointer
maximum transmission unit (MTU)
String Copy function strcpy
default Gateway
Storage class in C [auto, register, extern]
---------------------------------------------------------------------------------------------------------------All RIP routing protocols are based on a distance vector algorithm called the
Bellman-Ford algorithm
ospf - dijkstra algorithm
---------------------------------------------------------------------------------------------------------------ICMP

-------------------------------------------------------------------------------------------------------------On a scale of 1 to 10, how strong is your TCL? 9


Describe the TCL test programs that you've written.

8/25/2016 8:15 PM

TCL Question Answer - mullais

24 of 38

https://sites.google.com/site/mullais/logic/tool-command-language--tcl/tc...

Can you write a program in TCL to reverse a string from a list and store it in an
array?

proc sting rev {


set i [string length $rev]
while {$i >0} {
append rs [string index $rev [incr i -1]]
}
return $rs
}
sting madaM

###########################
#error
proc strReverse str {
array set rev {}
set i [string length $str]
while {$i > 0} {append rev [string index $str [incr i -1]]}
set rev
}
strReverse HI
---------------------------------------------------------------------------------------------Can you write a basic function to say add 2 numbers and return the answer?
proc add {a b} {
return [expr {$a+$b}]
}
add 1 8

-----------------------------------------------------------------------------------------UDP Packet details?

8/25/2016 8:15 PM

TCL Question Answer - mullais

25 of 38

https://sites.google.com/site/mullais/logic/tool-command-language--tcl/tc...

-----------------------------------------------------------------------------------------write a C program to get a prime number

main()
{
int a,c=0,i,n;
printf("enter the number to be checked");
scanf("%d",&n);

8/25/2016 8:15 PM

TCL Question Answer - mullais

26 of 38

https://sites.google.com/site/mullais/logic/tool-command-language--tcl/tc...

for(i=1;i<=n;i++)
{
a=n%i;
if(a=0)
{
c=c+1;
}
}
if (c=2)
{ printf("the given number is prime"); }
else
printf("the given number is not prime");
}

write a program to reverse a string in c?


----------------------------------------------------------------------------------------Technical questions (TCL)

1. Use of library in TCL


2. Connect A device using TCL, (like database connection)
3. What exact command you have used for connecting device?
4. What are the processes for an API to be used in perl?
5. How do you register a package?
6. How do you invoke a package in TCL?
7. Have you built any package?
8. How the interpreter will look for any package?
9. How do you debug any TCL code?
10.Unix-ipc? How will you connect two devices (router)? What method
will you use for that?
11.What is namespace in TCL?
12.How do you use namespace in TCL?
13.UNIX scripting. Whats your experience coverage
----------------------------------------------------------------------------------------UNIX file access attributes
greedy and nongreedy regular expression

8/25/2016 8:15 PM

TCL Question Answer - mullais

27 of 38

https://sites.google.com/site/mullais/logic/tool-command-language--tcl/tc...

Scripting language is a typeless language


keyplist
uplevel

convert list to array

proc na {a b {c 0} } {
puts $c$a$b
}
---------------------------------------------------------------------------------------------sample script for parray
set var_name(0) 1
set var_name(1) 2
parray var_name
O/P
var_name(0) = 1
var_name(1) = 2

-----------------------------------------------------------------------------------------#regexp to match y, Y, Yes, YES


proc w {a} {
if {[regexp "y|Y|YES|Yes" $a p]==1} {
puts $p
} else {
puts nomatch
}
}
wY
w YES

8/25/2016 8:15 PM

TCL Question Answer - mullais

28 of 38

https://sites.google.com/site/mullais/logic/tool-command-language--tcl/tc...

w Yes
wy
----------------------------------------------------------------------------------------#Socket script to connect port 80
proc getIp {{target www.google.com} {port 80}} {
set s [socket $target $port]
set res [fconfigure $s -sockname]
close $s
lindex $res 0
}
getIp
----------------------------------------------------------------------------------------#Telnet
set ask [socket 192.168.1.1 23]
fconfigure $ask sockname
-----------------------------------------------------------------------------------------proc external {} {
#this uses the TCP DNS port of the DNS root-servers.
#If these aren't reachable, you probably don't
#have a working external internet connection anyway.
set MyIP ""
foreach a {a b c d e f g h i j k} {
catch {
set external [socket $a.root-servers.net 53]
set MyIP [lindex [fconfigure $external -sockname] 0]
close $external
}
if { ![string equal $MyIP ""] } { break }

8/25/2016 8:15 PM

TCL Question Answer - mullais

https://sites.google.com/site/mullais/logic/tool-command-language--tcl/tc...

}
return $MyIP
}
External
This uses the TCP DNS port of the DNS root-servers. If these aren't reachable, we
probably don't have a working external internet connection anyway.
Depending on our setup, this procedure may take up to six minutes to complete
(DNS timeout and route timeout for eleven servers). For me it typically takes a
fraction of a second.
-----------------------------------------------------------------------------------------How are Tcl arrays different from Tcl scalar variables?
A Tcl scalar variable contains a string. That string can have some sort of
programmer envisioned data structure encoded into it.
What factors should be considered when determining when to use an array and
when to use a list?
Arrays use more memory than lists. Arrays provide O(1) access due to their hash
table nature, while lists provide O(1) access only for numerical indices.
------------------------------------------------------------------------------------------TCL script to find out localhost's IP address
proc address {} {
# find out localhost's IP address
set TheServer [socket -server none -myaddr [info hostname] 0]
set MyIP [lindex [fconfigure $TheServer -sockname] 0]
close $TheServer
return $MyIP
}
address
----------------------------------------------------------------------------------How does one set an array member value?
set array("key") "123xyz"
-------------------------------------------------------------------------------

29 of 38

8/25/2016 8:15 PM

TCL Question Answer - mullais

30 of 38

https://sites.google.com/site/mullais/logic/tool-command-language--tcl/tc...

What is a Tcl array?


A Tcl array is similar to what other languages call a hash or an associated array. It
is a data structure that allows one to associate an array member index (aka array
key) with an array member value. The array member index can be any legal Tcl
string. The array member value can be any legal Tcl string.
-----------------------------------------------------------------------------------Write a Procedure to sum two numbers with one variable has a default value.
proc sum {a {b 5}} {
set c [expr $a+$b]
puts $c
}
sum 1
-------------------------------------------------------------------------------------------------------------Create an array in TCL
Set var_name(0) 1
Set var_name(1) 2
Set var_name(2) 3
------------------------------------------------------------------------------------------Write a Procedure to sum two numbers
proc sum {a b} {
set d [expr $a+$b]
puts $d
}
sum 5 1
------------------------------------------------------------------------------------------Concatenate
This command treats each argument as a list and concatenates them into a single
list. It also eliminates leading and trailing spaces in the arg's and adds a single
separator space between arg's. It permits any number of arguments. For example,
the command
concat a b {c d e} {f {g h}}
a b c d e f {g h}
If no args are supplied, the result is an empty string.

8/25/2016 8:15 PM

TCL Question Answer - mullais

31 of 38

https://sites.google.com/site/mullais/logic/tool-command-language--tcl/tc...

------------------------------------------------------------------------------------------Write a TCL script to open a file in write mode


set fid [open new_file.txt w]
------------------------------------------------------------------------------------------Debugging in TCL
To see where the error was triggered in interactive mode, use errorInfo
proc a {} {
global errorInfo
puts hi
}
a
This variable shows index of the faulty line inside the procedure body info body
_the_name_of_the_procedure_
info body a
------------------------------------------------------------------------------------------Write a TCL script to open a file in read mode
set fid [open new.txt r]
r Open the file for reading only; the file must already exist. This is the default value
if access is not specified.
------------------------------------------------------------------------------------------#Script to get only two characters

puts "Enter any two characters"


set x [read stdin 2]
puts $x
#Script to accept any characters
puts "Enter any characters"
set y [gets stdin]
puts $y
#Script to accept any characters
puts "Enter any characters"
gets stdin z

8/25/2016 8:15 PM

TCL Question Answer - mullais

32 of 38

https://sites.google.com/site/mullais/logic/tool-command-language--tcl/tc...

puts $z
-------------------------------------------------------------------------------------------

proc sting rev {


set i [string length $rev]
set rs ""
while {$i >0} {
append rs [string index $rev [incr i -1]]
}
set i [string length $rev]
set k 0
for {set j 0} {$j<=$i} {incr j} {
puts -nonewline "$j\t"
set d [string index $rev $j]
set e [string index $rs $j]
puts "$d $e"
if {$d==$e} {
incr k
}
}
if {$k>$i} {
puts Palindrome
}
return $rs
}
sting madam
sting malayalam
sting netprowise
-------------------------------------------------------------------------------------------
How do you find the length of a string without using string length command in
TCL?
set len 0
set str "lenghtofthisstring"
set list1 [ split $str "" ]
foreach value $list1 {
incr len
}
puts $len
##################################
set str "lenghtofthisstring"
puts [llength [ split $str "" ]]
##################################

------------------------------------------------------------------------------------------What is a Test Case? Give example...


Definitions:
A test case in software engineering is a set of conditions or variables under which a
tester will determine whether an application or software system is working

8/25/2016 8:15 PM

TCL Question Answer - mullais

33 of 38

https://sites.google.com/site/mullais/logic/tool-command-language--tcl/tc...

correctly or not. Test cases are often referred to as test scripts, particularly when
written. Written test cases are usually collected into test suites.
Formal test cases:
In order to fully test that all the requirements of an application are met, there must
be at least two test cases for each requirement: one positive test and one negative
test.
Informal test cases:
In scenario testing (Informal test cases), hypothetical stories are used to help the
tester think through a complex problem or system. These scenarios are usually not
written down in any detail.
Test case format:
* test case ID
* test case description
* test step or order of execution number
* related requirements
* expected Result
* test category
* author
* check boxes for whether the test is automatable and has been automated.
Additional fields that may be included and completed when the tests are executed:
* pass/fail
* remarks
* review comments
------------------------------------------------------------------What is unit testing?
Unit testing is a software development process in which the smallest testable parts
of an application, called units, are individually and independently scrutinized for
proper operation. Unit testing is often automated but it can also be done manually.
This testing mode is a component of Extreme Programming (XP), a pragmatic
method of software development that takes a meticulous approach to building a
product by means of continual testing and revision.
Unit testing involves only those characteristics that are vital to the performance of
the unit under test. This encourages developers to modify the source code without
immediate concerns about how such changes might affect the functioning of other
units or the program as a whole. Once all of the units in a program have been
found to be working in the most efficient and error-free manner possible, larger

8/25/2016 8:15 PM

TCL Question Answer - mullais

34 of 38

https://sites.google.com/site/mullais/logic/tool-command-language--tcl/tc...

components of the program can be evaluated by means of integration testing.


Unit testing can be time-consuming and tedious. It demands patience and
thoroughness on the part of the development team. Rigorous documentation must
be maintained. Unit testing must be done with an awareness that it may not be
possible to test a unit for every input scenario that will occur when the program is
run in a real-world environment.
------------------------------------------------------------------------------------------What is the cost percentage for Testing in whole Project cost ?
Testing cost will be measured on metrics formulae
Test cost (in %) = (Cost of testing / total cost of project) *100
------------------------------------------------------------------------------------------IP
IP Header Length (IHL)Indicates the datagram header length in 32-bit words.
Total LengthSpecifies the length of the entire IP packet, including data and
header, in bytes.
IdentificationConsists of an integer identifying this datagram. This field is used
to help piece together datagram fragments.
FlagsConsists of 3 bits, of which the low-order 2 bits control fragmentation. One
bit specifies whether the packet can be fragmented; the second bit specifies
whether the packet is the last fragment in a series of fragmented packets.
ProtocolIndicates which upper-layer protocol receives incoming packets after IP
processing is complete.
Header ChecksumHelps ensure IP header integrity.
OptionsAllows IP to support various options, such as security.
DataContains upper-layer information.
------------------------------------------------------------------------------------------How can it be known when to stop testing ?
This can be difficult to determine. Many modern software applications are so
complex, and run in such an interdependent environment, that complete testing
can never be done.
Common factors in deciding when to stop are:
- Deadlines (release deadlines, testing deadlines, etc.)
- Test cases completed with certain percentage passed
- Test budget depleted
- Coverage of code/functionality/requirements reaches a specified point
- Bug rate falls below a certain level

8/25/2016 8:15 PM

TCL Question Answer - mullais

35 of 38

https://sites.google.com/site/mullais/logic/tool-command-language--tcl/tc...

- Beta or alpha testing period ends


------------------------------------------------------1. What ports does FTP traffic travel over?
2. What ports does mail traffic utilize?
3. What ports do HTTP and HTTPS use?
4. Why is NTP required in an NFS network?
5. Name some common mal software on the server side
6. What is CPAN? How do you access it?
7. What is PEAR?
8. What advantages does mod_perl have over a perl CGI?
9. What is required to do SSL in Apache 1.x?
10. What is Tcl?
11. What is a servlet engine/container?
12. What is BIND?
13. Name the steps to setup a slave zone in BIND
14. Name the steps to setup a primary zone in BIND
15. What commands would you use under Solaris or Linux to modify/view an LDAP
tree?
------------------------------------------------------------------------------------------1. Explain Bug Life Cycle ?
Bug life cycles are similar to software development life cycles. At any time during
the software development life cycle errors can be made during the gathering of
requirements, requirements analysis, functional design, internal design,
documentation planning, document preparation, coding, unit testing, test
planning, integration, testing, maintenance, updates, re-testing and phase-out.
Bug life cycle begins when a programmer, software developer, or architect makes a
mistake, creates an unintentional software defect, i.e. a bug, and ends when the
bug is fixed, and the bug is no longer in existence.
2. What is Integration Testing and Regression Testing ?
Integration Testing :
Combining the modules together & construct software architecture.
To test the communication & data flow

8/25/2016 8:15 PM

TCL Question Answer - mullais

36 of 38

https://sites.google.com/site/mullais/logic/tool-command-language--tcl/tc...

White & Black box testing techniques are used


It is done by developer & tester
Regression Testing
It is re-execution of our testing after the bug is fixed to ensure that the build is
free from bugs.
Done after bug is fixed
It is done by Tester
3. What is Verification and Validation ?
Verification and Validation : Both assures that a software system meets a user's
needs.
Verfication : is a proces of confirming that software meets its specification.
Validation : is a process of confirming that it meets user specifiaction.
Verification: Is the process by which we analyse whether we built the software
right; meeting the Software Requirement Specification.
Validation: Is the process by which we anlayse whether we built the right software;
taking into account the standards of the organisation building the software and
customers business needs.
4. How does Winrunner recognizes the project which is in custom build ?
5. What is expert view and tree view ?
6. How does QTP identify the project ?
7. What is the difference between Winrunner and QTP ?
8. What is Test Director and which version of test director your are using in your
project ?
9. What is a test plans ?
The Test Plan describes the overall approach to development, integration,
qualification, and acceptance testing. It describes plans for testing software
systems; test environment to be used for the testing; identifies tests to be
performed, and provides schedules for test activities.
10. what are the contents present in a test plan ?
1. Introduction
objectives
reference document
2. Coverage of Testing
Features to be tested
Features not to be tested
3. Test Strategy
leves of testing
types of testing

8/25/2016 8:15 PM

TCL Question Answer - mullais

https://sites.google.com/site/mullais/logic/tool-command-language--tcl/tc...

test design techniques


configuration management
test maticx
terminology
automation plan
list of automation tools
4. Base Criteria
acceptance criteria
suspension criteria
5. test deliverable
6. test environment
7. scheduling
8. staffing and training
9. risks and solution plan
10. assumptions
11. approval information
11. What is the risk of testing a project ?
------------------------------------------------------------------------------------------What is software testing?
Software testing is a part of software development life cycle. It is the process of
running/evaluating an application/program/document for two reasons.
To find errors
To ensure the application meets customers requirements.
What is its importance in software development?
Testing can
avoid errors in a software
identify errors in a software
When to start testing an application?
Testing should be started as early as possible. Once requirements are clear & the
first document is available, you can start testing phase by verifying the documents.
-------------------------------------------------------------------------------------------

37 of 38

8/25/2016 8:15 PM

TCL Question Answer - mullais

38 of 38

https://sites.google.com/site/mullais/logic/tool-command-language--tcl/tc...

Mullaiselvan. M
Monday05April2010

Sign in | Recent Site Activity | Report Abuse | Print Page | Powered By Google Sites

8/25/2016 8:15 PM

Das könnte Ihnen auch gefallen