Showing posts with label tool. Show all posts
Showing posts with label tool. Show all posts

Saturday, March 25, 2017

Tools learning for testing

Many times folks used to ask, what tools would be good for testing career. Used to advice to learn popular tools (mostly commercial tools) based on their coding skills and interest. But this scenario is changed in last few years. Testers should be ready to handle the automation based on business needs, rather than just toolsmiths. Also mindset change should be there, instead of sticking with just one tool and one scripting language

Read an article recently in this line and few excerpts..


It’s important to ask yourself, why do you want to learn about a specific tool or set of tools? They are an integral part of software testing, supporting what we do on a daily basis. However, having knowledge of a set of tools is less important than knowing when and where to use the right tool. An effective tester will also have the skill to know when and where to use the right tool because the problem requires it, not because the job market determines it desirable. Using the wrong tool at the wrong time can have adverse effects on your day-to-day work, potentially slowing you down, or worse, giving you biased or flat out false information. That’s not to say you shouldn’t explore new tools, but always remember:

Problem first, tools second
With this concept in mind, let’s explore different categories of tools. Some examples will be offered but they are by no means an exhaustive list. I encourage you to build up a toolbox or reference list of tools you have used in the past.


Original Article - What Tools Should I Learn?

Wednesday, May 28, 2014

Top 5 Requirements for test automation tool

Recently there is an interesting discussion about top five requirements. Expectations are varied in group and few interesting thoughts...

Priorities for Advanced automation tool

  1. Robust Hybrid (Keyword driven+ Data Driven, etc) framework - None of the tool vendors are giving the libraries for Keyword driven Framework
  2. Language and OS independent - Should support multiple languages or libraries developed from multiple languages. Also tests should able to run in different type of OS. If I look test automation for past 15 years, tools are started to support multiple languages in last 6 years.
  3. Multi-browser and Multi-device support. For Mobile & Table support, tool should be lightweight app. Should use less storage for installation and less memory for execution.
  4. Ability to hook/hack custom object through programming or libraries
  5. Support for Continuous Integration tools - Automatically Should be able to deploy the build and then initiate the test suites and sent the report through email or SMS or any other devices.


To see few more experts answers - Discussion - What are the top five requirements for a test automation tool?

Tuesday, September 16, 2008

Automating Windows/Unix/Linux Server calls by w3Sockets

Earlier I have written a post Expect-Automating Command line tools for Expect utility. Now we can access any server machines by using VBScript. Dimac Development has implemented a COM interface to connect through Telnet and made as freeware. You need to download w3Sockets Dll and register it using SocketReg.exe included in a zip file. It is similar to expect utility. You can verify each command and can change the execution flow based on console output. It is much useful for automated testing as well as server administration. Below I have given a sample code to start windows services.

w3Sockets Reference
w3Sockets - Download Page

To start servers on Windows/Unix/Linux Systems



'To start servers on Windows/Unix/Linux server
Dim w3sock

Set w3sock = CreateObject("socket.tcp")
With w3sock
.timeout = 5000
.DoTelnetEmulation = True
.TelnetEmulation = "TTY"
.Host = "myserver:23"
.Open
.WaitFor "login:"
WScript.Echo .Buffer
.SendLine "myloginid"
.WaitFor "password:"
.SendLine "Password12"
.WaitFor ">"
.SendLine "net start ""MyServer Manager"""
.WaitFor ">"
WScript.Echo .Buffer
.SendLine "net start ""MYDB Repository"""
.WaitFor ">"
WScript.Echo .Buffer
.Close
End With
Set w3sock = Nothing

Monday, February 25, 2008

Expect - Automating Command line tools

Automating command line (CLI) tasks are always challenging for GUI automation tools. In my previous company, I used to use EXPECT for this kind of tasks. You can use telnet utility or Expect scripts to do this. I used EXPECT with Silktest. Expect is having a feature, you can feed the input based on the previous command's result. You can take baseline and compare with the current result.

You can connect with different operating Systems by expect scripts. It is developed as a package with Perl and Tcl/Tk. Three commands are central to the power of Expect. They are send, expect and spawn . The send command sends strings to a process, the expect command waits for strings from a process, and the spawn command starts a process.

Important Links
EXPECT home page
Windows version of EXPECT is available here
Getting Started

Sample
Call your EXPECT script by an batch or shell script. There you can pass the data as arguments.

4test statement:
SYS_Execute ("{GetProgramDir ()}\runftp_twiceexp.bat
{GetProgramDir ()}\ {lsInput[1]} {lsInput[2]}}} {lsInput[8]}", lsOutput)

Sample EXPECT code:


-----------------------------------------
##!/usr/local/bin/expect -f
#
# Automation for Unix system
#
#To delete the files from outbox table.
#
# hub name, installation path name, mailbox name is required.
#
# Author: Palani Selvam
#

# Check expect version
exp_version -exit 5.0.3

# root user login details
set username "root"
set upass "myrootpwd"

#super user login details
#set superuser "su"
#set supass "g0india"

#client,mailbox details
set pesetup_path "/opt/comp/pal_pnr"
set peclient "testhub"
set pmailbox "test_auto"

set timeout 10

#Start Telnet session
#spawn telnet jaguar

spawn telnet
expect "telnet>"
#send "telnet\r"
send "open jaguar\r"
sleep 1

expect {
"ogin*" {
# In case login is "Login or login"
send "$username\r"
sleep 1
}
timeout {
send_user "connection has timed out.\r\n"
exit
}
}
expect {
"assword*" {
# In case password is "Password or password"
send "$upass\r"
sleep 5
}
timeout {
send_user "password field has timed out.\r\n"
exit
}
}

# Partner or hub
expect {
"#*" {
send "cd $pesetup_path/data/stpush\r"
sleep 5
send "cd $peclient/$pmailbox/outbox\r"
sleep 4
send "ls -ltr *\r"
sleep 5
}
timeout {
send_user "Super user login has failed.\r\n"
exit
}
}

expect {
"rw*" {
send "cd completed\r"
sleep 2
send "rm *\r"
sleep 2

send "cd ../failed\r"
sleep 2
send "rm *\r"
sleep 2

send "cd ../partial\r"
sleep 2
send "rm *\r"
sleep 2

send "cd ../pending\r"
sleep 2
send "rm *\r"
sleep 2

send "cd ../retry\r"
sleep 2
send "rm *\r"
sleep 2
#puts "All files are deleted in outbox table.\r\n"
}
timeout {
send_user "Files are not existing in outbox table.\r\n"
exit
}
}

#To exit from the telnet
send "exit\r"
sleep 2
send "exit\r"

#Close the session
expect eof
-----------------------------------------