Beruflich Dokumente
Kultur Dokumente
1 of 38
https://sites.google.com/site/mullais/logic/tool-command-language--tcl/tc...
mullais
Navigation
Mullaiselvan . M
Sitemap
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
edited by Mullaiselvan
Mohan
attachment from
Mullaiselvan Mohan
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
2016
edited by Mullaiselvan
Mohan
View All
8/25/2016 8:15 PM
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
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"
8/25/2016 8:15 PM
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
5 of 38
https://sites.google.com/site/mullais/logic/tool-command-language--tcl/tc...
8/25/2016 8:15 PM
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
7 of 38
https://sites.google.com/site/mullais/logic/tool-command-language--tcl/tc...
8/25/2016 8:15 PM
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
9 of 38
https://sites.google.com/site/mullais/logic/tool-command-language--tcl/tc...
8/25/2016 8:15 PM
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
11 of 38
https://sites.google.com/site/mullais/logic/tool-command-language--tcl/tc...
8/25/2016 8:15 PM
12 of 38
https://sites.google.com/site/mullais/logic/tool-command-language--tcl/tc...
8/25/2016 8:15 PM
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.
8/25/2016 8:15 PM
14 of 38
https://sites.google.com/site/mullais/logic/tool-command-language--tcl/tc...
---------------------------------------------------------------------------------------------------------------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
}
8/25/2016 8:15 PM
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
https://sites.google.com/site/mullais/logic/tool-command-language--tcl/tc...
16 of 38
8/25/2016 8:15 PM
17 of 38
https://sites.google.com/site/mullais/logic/tool-command-language--tcl/tc...
8/25/2016 8:15 PM
https://sites.google.com/site/mullais/logic/tool-command-language--tcl/tc...
functionality of software.
18 of 38
8/25/2016 8:15 PM
19 of 38
https://sites.google.com/site/mullais/logic/tool-command-language--tcl/tc...
8/25/2016 8:15 PM
20 of 38
https://sites.google.com/site/mullais/logic/tool-command-language--tcl/tc...
8/25/2016 8:15 PM
21 of 38
https://sites.google.com/site/mullais/logic/tool-command-language--tcl/tc...
8/25/2016 8:15 PM
22 of 38
https://sites.google.com/site/mullais/logic/tool-command-language--tcl/tc...
8/25/2016 8:15 PM
23 of 38
https://sites.google.com/site/mullais/logic/tool-command-language--tcl/tc...
8/25/2016 8:15 PM
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?
###########################
#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
8/25/2016 8:15 PM
25 of 38
https://sites.google.com/site/mullais/logic/tool-command-language--tcl/tc...
main()
{
int a,c=0,i,n;
printf("enter the number to be checked");
scanf("%d",&n);
8/25/2016 8:15 PM
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");
}
8/25/2016 8:15 PM
27 of 38
https://sites.google.com/site/mullais/logic/tool-command-language--tcl/tc...
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
8/25/2016 8:15 PM
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
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
30 of 38
https://sites.google.com/site/mullais/logic/tool-command-language--tcl/tc...
8/25/2016 8:15 PM
31 of 38
https://sites.google.com/site/mullais/logic/tool-command-language--tcl/tc...
8/25/2016 8:15 PM
32 of 38
https://sites.google.com/site/mullais/logic/tool-command-language--tcl/tc...
puts $z
-------------------------------------------------------------------------------------------
8/25/2016 8:15 PM
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
34 of 38
https://sites.google.com/site/mullais/logic/tool-command-language--tcl/tc...
8/25/2016 8:15 PM
35 of 38
https://sites.google.com/site/mullais/logic/tool-command-language--tcl/tc...
8/25/2016 8:15 PM
36 of 38
https://sites.google.com/site/mullais/logic/tool-command-language--tcl/tc...
8/25/2016 8:15 PM
https://sites.google.com/site/mullais/logic/tool-command-language--tcl/tc...
37 of 38
8/25/2016 8:15 PM
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