Subscribe by Email


Showing posts with label Scripting. Show all posts
Showing posts with label Scripting. Show all posts

Friday, October 26, 2012

How to run the silk scripts?


Silk test as we know is a test automation tool from the Borland which was launched in the year of 2006. This tool facilitates the automated regression testing and functional testing. However, the credit for the original creation goes to the segue software.
Various clients are offered by the silk test as described below:
  1. Silk test classic: This client of the silk test makes use of the domain specific language called “4test” for scripting of the test automation scripts. This language just like the C++ language is an object oriented language. Just like C++ it also makes use of the Object Oriented concepts such as following:
a)   Inheritance
b)   Classes and
c)   objects
  1. Silk 4J: This client of the silk test enables one to follow test automation by using java as the scripting language in eclipse.
  2. Silk 4 net: This client of the silk test also enables one to follow test automation by using VBScript or sometimes using C# as the scripting language in the visual studio.
  3. Silk test work bench: This client of the silk test enables the testers to carry out the automation testing using VB.net as the scripting language as well as on a visual level.

What kind of files a silk script consists?

In this article we are going to see how the execution of the test scripts takes place in silk test.
-  A basic or a typical silk script consists of two files namely:
  1. Include file and
  2. Script file
- The include file of the silk script is saved with an extension .inc and is particularly for the declaration of the following:
  1. Window names
  2. Window objects
  3. Variables
  4. Constants
  5. Structures
  6. Classes and so on.
- The second file i.e., the script file contributes in writing of the scripts. 
- It is saved by the extension .t and is used for defining of the body of the scripts. 
- Test cases meeting the various test conditions are defined in this script. 
- The two different types of files have been used to maintain the clarity of the code as much as possible. 
- If the include file of the test script does not consists of any of the test cases then the file may be compiled but cannot be executed. 
- If tried for the execution an error will be generated saying that there are no test cases. 
- Only the include file which consists of some test case can be run. 
- Before you run the script always make sure that you make separate declaration for the files:
  1. For the declaration of the objects and
  2. For creation of the scripts using declaration file.

Steps for running Test Scripts

After the two declarations have been made you should proceed for their compilation. Below we are stating the steps that are to be followed for running the test scripts:
  1. Launch the silk test automation tool.
  2. Open the script file of the script to be executed.
  3. Compile the above script by using the compile option from menu bar.
  4. Once the compilation of the file is complete the status of the script can be checked by the progress status.
  5. Any errors present in the script will be displayed at the end of the compiling process.
  6. Now run the silk scripts by clicking the run option in the menu bar.
  7. For running the test scripts you have two options: either you can run all of them at a single stretch or you can run them selectively.
  8. If you have opted for the latter option then you need to specify which all tests have to be executed.
  9. After selection you can again give the run command. 


Thursday, October 11, 2012

What is 4Test in Silk Test?


4test in silk test is a fourth generation language or 4GL which comes under the category of the object oriented languages. This fourth generation language has been developed especially for fulfilling the needs of the quality assurance professionals. 
The 4test language possesses some very powerful features that have been grouped in to 3 basic kinds of functionality as described below:
  1. A library of object oriented classes: This group of functionality includes object oriented methods as well as classes that can be used to specify interaction of a test case with the GUI objects present in an application.
  2. A library of built in functions: This group of functionality includes features that are used for performing the common support tasks.
  3. A set of statements, data types and operators: This group of functionality includes the features that can be used for introducing the logic as well as the structure to a data base that has been recorded earlier.
- Before the test scripts are created and run, an object repository containing the information regarding the application under test or AUT is to be used by the silk test classic. 
- This object repository consists of the descriptions of all the GUI objects that are present in the application under test or AUT. 
- The actions that are performed by the silk test on these GUI objects are recognized by the silk test based up on some methods as well as properties associated with the objects on which the actions have been performed. 
- After the identification, the actions performed are recorded and stored in the object repository using the 4test language for scripting. 
- There are several classes that are used by the 4test language and have been mentioned below:
  1. Active X classes
  2. Visual basic classes
  3. General core classes
  4. General web application classes
  5. Flex class reference
  6. Java classes
  7. .net classes
  8. Rumba class reference
  9. SAP class reference
  10. Silver light class reference
  11. Java AWT class reference
  12. Java swing class reference
  13. Win 32 classes
  14. WPF class reference
  15. Xbrowser classes
The 4test language comes with the following in built functions:
  1. Agent information functions
  2. Argument pass modes functions
  3. Application state control functions
  4. Array manipulation functions
  5. Character and string conversion functions
  6. Data type manipulation functions
  7. Data base functions
  8. Data driven functions
  9. Date and time manipulation functions
  10. Distributed processing functions
  11. Distributed results logging functions
  12. Exception handling functions
  13. File manipulation functions
  14. Java functions
  15. List manipulation functions
  16. Locale functions
  17. Numeric functions
  18. Operation system calls
  19. Product version information functions
  20. Password encryption functions
  21. Random value operations
  22. Registry operations
  23. Results file operations
  24. Run time status messages functions
  25. Script information functions
  26. Semaphores
  27. Set manipulation functions
  28. String manipulation functions
  29. SWT functions
  30. Timers time date information
  31. Web browser functions
  32. Windows information functions
  33. Date transformation functions
The 4test language comes with the following categories of keywords:
  1. Arg list call keyword
  2. Current file keyword
  3. Current path keyword
  4. Type info keyword
  5. Alias keyword in type declarations
Following types of statements are found in 4test language:
  1. Access statement
  2. Break statement
  3. Const statement
  4. Continue statement
  5. Critical statement
  6. Exit statement
  7. Do___ except statement
  8. For statements
  9. If statement
  10. Multi tag statement
  11. Parent statement
  12. Parallel statement
  13. Raise statement
  14. Rendezvous statement
  15. Reraise statement
  16. Select statement
  17. Setting statement
  18. Spawn statement
  19. Switch statement
  20. Return statement
  21. Tag statement
  22. Use statement
  23. With statement
  24. While statement


What is a Silk Test Automation Tool? How Silk Test works?


In this article the focus is up on the silk test automation tool and the way it works. 


What is a SilkTest Automation Tool

- Silk test is test automation tool developed originally by the “segue software’. 
- However, later on, this software firm was acquired by the “Borland” in the year of 2006. 
- Again, this Borland software firm was acquired by a third company by the name of “micro focus international” in the year of 2009. 
- This test automation tool was developed for the testing of the enterprise applications via the functional and regression testing methods. 

There are many different forms of silk test or we can say it provides the software world with many of its clients as described below:

  1. Silk test classic: This client of the silk test makes use of the domain specific language known as “4test” for scripting of the test automation scripts. This language just like the C++ language is an object oriented language. Just like C++ it also makes use of the Object Oriented concepts such as following:
a)   Inheritance
b)   Classes and
c)   objects
  1. Silk 4J: This client of the silk test enables one to follow test automation by using java as the scripting language in eclipse.
  2. Silk 4 net: This client of the silk test also enables one to follow test automation by using VBScript or sometimes using C# as the scripting language in the visual studio.
  3. Silk test work bench: This client of the silk test enables the testers to carry out the automation testing using VB.net as the scripting language as well as on a visual level.
The silk test automation comes with two major features which have been discussed below:

  1. Silk test agent: This feature of the silk test helps in translation of the script commands in to equivalent graphical user interface or GUI commands or we can even say in to user actions.The translated commands then can be run or executed on either the same machine or on a remote machine as a host.
  2. Silk test host: This feature takes hold of all the source script files.
- All the windows and controls of the AUT or application under test are identifiable with the silk test as objects. 
- Also, all the properties as well as attributes of each and every window can be defined by the silk test.
- Thus, we can say that the object oriented implementation is partially supported by the silk test. 
- The movements of the mouse as well as the key strokes can be identified by running the silk test automation tool. 
- This feature is particularly useful for the custom objects. 

The silk test can work for the following three programming methods that involve capturing of the dialogues:
  1. Record
  2. Play back and
  3. Descriptive programming
Many of the extensions are supported by the silk test and few of them are:
  1. .net
  2. Java swing
  3. Java swt
  4. DOM
  5. IE
  6. SAP windows GUI
  7. Firefox and so on.
- Bitview. Exe is the silk test bitmap tool that is used by the silk test for capturing as well as comparing the windows and areas.
- There are several file types that find their use in the silk test and have been mentioned below:
  1. Test plan (.pln)
  2. Test script (.t)
  3. Frame file (.inc)
  4. Result file (.res)
- According to a survey, the silk test provides the proper and right interface either IDE powered, script based or visual bases as it suits the role. 
- As a result, all the users are empowered to take participation in the testing process which ensures that there is a continuous validation of the critical applications. 


Thursday, September 27, 2012

How would you connect to database using vbscript?


VBScript or visual basic scripting edition is the basic scripting language for the HP test automation suite called the quick test professional. This scripting language is quite a lively script whose interpretation is done via script host of the Microsoft windows. This scripting language comes with a whole lot of excellent and powerful functions with good support for data types, error handling and variables. 

There are two engines that can interpret the VBScript namely:
  1. Wscript.exe and Cscript.exe: it works in the GUI environment f the windows with the help of the WSH or windows script host. However this engine is basically used for automating the administration tasks as well as to automate the systems.
  2. VBScript.dll- this engine can be invoked by asp.dll and basically serves in the web environment.
VBScript is used as the following in quick test professional:
  1. Data base record set object
  2. Data base command object
  3. Data base connection object
Here in this article, it has been discussed about how a connection between data base and quick test professional can be established through the VBScript. 

The below mentioned are the various VBScripts available for connecting and accessing data base in quick test professional:
  1. Updating records in a record set
  2. Deleting a record from the record set
  3. Finding a record in record set
  4. Clearing a data base table
  5. Connecting to an ADO data base
  6. Adding a new record to the data base

How to connect to a database using VBScript?

- To connect to a data base using VBScript, a DSN inventory is required. 
- An ADO connection is another requirement for making an open connection with a specific data source. 
- Once this connection is established, the data base can be easily accessed as well as manipulated. 
- Also, once this connection is established it is not important how many times that data base is accessed. 
- Another way to establish a connection with the data base using VBScript is by passing a connection string through some record set object or a particular command. 
- Though this method is quite quick but it holds good only for the single specific queries. 
- An essential connection from a web server to a data base is nothing but a data source. 
- This connection can either be established via a dedicated machine running SQL server or through a data base file on a web server at some other location. 

Two types of DSNs or data sources are available namely:
  1. File DSN: This is the connection that is created by the script when an access to the data base is required. Here the path and name of the data base to be accessed needs to be specified. Another condition for this DSN to work is that the data base to be connected to must be residing on a server in a directory which must be accessible by the script.
  2. System DSN: Creation of this kind of connection is under the charge of the administrator of the web server which consists of the required data base. This is the most popular data base connection since it is much reliable than its former counterpart.
- After the access to the data base is complete it is important that the connection should be closed at the end of each page. 
- For creating any application, the foremost thing that is required is data base itself. 
- A number of programs are available for developing a data base, however, the Microsoft access remains the most popular of them all. 
- It is important for web application designer to know the basics of the data base usage with VBScript as well as active server pages for developing real web applications.


Monday, July 16, 2012

What are the types of web testing security problems?


Web testing is much in demand these days since the use of web sites and web applications are increasing by huge margins day by day. As the cyber crimes are increasing, web sites and web applications call for more security settings which in turn plunge in to the web testing schedule as the web testing security problems.

"Web testing is a kind of software testing that focuses on web sites and web applications. The security issues of the web sites and web applications are addressed by another type of web testing called web security testing". 

The testing of the web sites and web applications for security vulnerabilities is quite and exciting concept. Though the matter is quite exciting, it needs to be taken seriously. The best method to combat with the known web testing security problems can be to be prepared in advance and having knowledge of what is to be checked for.

In this article we are going to take up some of the most common security aspects that can pose problems in web testing. They are mentioned below:
  1. Server problems: These are the most common security problem. It happens many a times that the server is down for maintenance or some other reason.
  2. Hardware problems
  3. Data base problems: Any problems in the data base of the web site or web application gives rise to many of the security problems. Any problem and uncertainty in the data base can prove to be a danger to the overall security of the web site or web application.
  4. Navigation from one page to another: Too much of navigation from one page to another endangers the security of the web site or web application which in turn acts as a hindrance in the web testing of that particular web site or web application.
  5. Server security: A server houses a web site or web application data base; therefore it is obvious that the security of the web site or the application relates a lot to the security of the server. Maintaining the security of the web server is quite an important point which otherwise could introduce many of the security problems during the web testing.
  6. Authentication issue
  7. Data encryption
  8. User privileges leaks
  9. SQL injection
  10. Cross side scripting
  11. Cookie testing
  12. The content on a web site that proves to be inaccessible or incorrect can also pose security problems during web testing.
  13. Improper validation of the input can disturb the working mechanism of the web site or web application.
  14. Link testing is an important aspect of web testing. Broken links can hamper the security of the web site or application and thus poses problems in web testing security.
  15. Incorrect copyright information.
  16. Incorrect EULA or end user license agreement.
  17. Un-optimized images that do not meet the specifications.
  18. Improper storage of the data obtained through the web pages.
  19. Time taken by the pages to render.
  20. Lag in performance with many simultaneous users.
  21. Concurrency issues like when a user is working on multiple windows of the same page or there are multiple users on the same page.
  22. Improper and inefficient tracking of the transactions by the server log.
  23. Improper usage of SSL by the web site or web application.
  24. Inefficient working of the feeds.
  25. Inefficient working of the cookies.
Web testing is absolutely essential if you want make sure that your web site or web application has enough browser support and the HTML is valid. 


Thursday, July 5, 2012

What are principles of good testing scripts for automation?


By test automation frame work we mean the overall environment that is constructed for the execution of the tests. These testing frameworks as well as the test cases are handled with the help of test scripts. A lot depend on these tests scripts since it is the efficiency of the test scripts that decide how efficient the testing process will be. 

The point here is that there are several scripting tools around us and we need to select the tools that will work quite well for our software systems and applications. In this article we have discussed some principles of good testing scripts for test automation. 

What are principles of good testing scripts?


- The testing scripts should be application or software system specific and should have been captured or manually coded in to the proprietary language of the automation testing tool. 
- Good testing scripts are those that have been modified in order to accommodate the variable data. 
- These accommodated variables are used in the key input fields of the software system or application as well as program selections.
- By the virtue of these variables the script is able to drive the application with external data that is supplied by calling routines that invoked the test scripts.
- Good scripts often house the very fragile recognition strings as well as hard coded strings very well required for the software components when they operate. 
- The good testing scripts are quite flexible and are not broken whenever a change is made to the software system or application or if the application software is revised. 
- The particular scenario of any valid event occurs 100s of times in the testing scripts that are involved in the testing of some software system or application. 
- It is possible that during the testing of the software system or application the testers involved with the testing may get a false sense of security and satisfaction with the test results when the testing scripts used are not good enough. 
- Another principle of good testing scripts is that the all of the efforts related to test design are virtually developed in that language in which the automation tool has been scripted. 
- It is also possible that the scripts might be duplicated in both automated and manual script versions. 
- A test automation frame work that relies wholly up on the testing scripts represents the quickest as well as the easiest means for the implementation of the automation testing tools. 

Some other principles of good testing scripts are:


There are few other principles of good testing scripts for test automation as stated below:
  1. Proper exception handling techniques.
  2. The scripts should adhere to the coding standards as well as the guiding standards.
  3. Proper frame work should be used to create the testing scripts.
  4. Comments should be provided for each and every step in the scripts.
  5. A standard format for exception handling and definition of the functions should be followed.
  6. Use of appropriate synchronization techniques.

To Conclude:


- The best practices for writing the code should be chosen and used to create testing scripts. 
- In some, the optional explicit can be used. 
- It is necessary to follow the process of commenting since it is one of the good practices and make the code more readable. 
- Whenever you sense some bug or fault, debugging technique is a must to be followed. 
- All the testing scripts must follow a clean up routine after every execution. 
- Whatever the scripts have been developed they must be reusable. 
- Usually the scripts are executed via short programs that have been extensively parameterized. - The reusability of the testing scripts is an added advantage is in case in you later need to perform regression testing. 


Wednesday, July 4, 2012

What are common problems of test automation?


With the number of complex and advance applications increasing, the need for automation testing has also taken a strategic and critical point. In the past, the applications were quite simple and free of jargon. Assuming the level of testing to be sufficient at that time, how can we even think of testing today’s explosive software systems and applications with that level of software testing?

At this point of thinking, we come across two possibilities out of which first one is to increase the working staff and second one is to increase the level of testing. Following the first possibility seems like a bit ambiguous because the number of skilled testers is often less. So we are left with the second possibility. 

Over the years the testing has advanced and today we have what is called test automation process by virtue of which so many manual testing processes have been automated and precious human time has been saved. But this process too is not free of faults and problems. In this article we have focussed up on the common problems of the test automation.

Common Problems of Test Automation


- If you see the past cases you will come to know that the test automation did not reached the level of success at which it is today in one go itself, rather it faced many failures in the beginning. 
- So many test automation efforts were born which eventually died because of lack of efficiency in them. 

The First Problem:
- With test automation process, the vendors who develop and sell test automation tools do not provide any instantaneous demonstrations of the working of their tool and the simplicity and efficiency of the tools cannot be rightly judged. 
- What we see are some of the software systems and applications that the vendor has and up on which the testing tools work quite efficiently and think those tools will work in the same way for our applications also. 
- Consequently, what happens is that after doing many projects also we do not achieve same level of success. 
But we cannot blame the testing tools for the whole thing. 
- One possibility is also that the elements present in our software system or application might not be compatible with the testing tools that we are employing to test them.
- The only way to escape such pitfalls is that we try to develop some creative solutions using which we can make our software systems and applications compatible with the testing tools.
- This is perhaps the only way to make the testing tools work with our software systems and applications.
- There are so many commercial testing tools available that are marketed as solutions for testing the software products instead of being sold as solid aids for a wide test automation frame work. 
- One thing is common among all the software testing tools which is that they all contain one or the other scripting language that allows us to discover each tool’s failings. 

The Second Problem:
- Another problem with automation testing is that the testers carrying out the automation are not having any high development experience nor do they have been given ample training to exploit these testing processes and programming environments. 
- The automation testing requires both programming skills and testing skills, but what we have are only testers i.e., the testers who are not programmers. 
- Therefore for test automation to be effective, it is necessary that they should be expert in both testing as well as in programming. 
- Due to a lack of experience, the developers often make a simple solution far too complex to be maintained and implemented. 


Define the scripting techniques for test automation?


The main goal of the test automation process is that a highly maintainable and modular frame work should be developed. In a good automated test framework all the modules are independent and distinct from each other and what is happening inside the frame work are not a thing to be bothered by the outsiders. This is all possible with good test scripts. 

Why Scripts are useful?


- With the help of the scripts, the functionality contained inside each module can be readily expanded without causing any impact on other parts of the software system and application.
- Such scripting makes the maintenance of the program code much easier than ever it would be. 
- In addition to this, the complexity of the module will also be reduced with such good scripting. 
- However, maintaining the modularity of the frame work alone will not help, the test scripts should be fully documented. 
- Without adequate documentation, no body will be able to understand properly the working of the test scripts. 
- If this scripting has not been done properly than our test automation process is sure to become a negative statistic for us. 

What are different Scripting Techniques for Test Automation?



1. Linear scripting technique: 
- This scripting technique is quite a simple one and follows simple recording and playback. 
- This is often used by the testers and developers for carrying out the automation of the test cases as well as test flows of the software system or application under question. 
- This technique consists of some redundant functions that are not always required. 
- Some other features of this technique are:
(a)   It is a non structured way of scripting.
(b)   Scripts define the test cases.
(c)    Low development costs.
(d)   Scripts are not shared.
(e)   Scripts are fragile.

     2. Structured scripting: 
     - This scripting technique employs the control structures in the scripts. 
   - With these control structures the testers are able to control the flow of the test cases and scripts. 
    - This one unlike the linear technique is a structured way of scripting and costs a little more. 
    - Its other features are:
     (a) Scripts define the test cases.
     (b) Testers require intermediate programming skills. 
      (c)  Some planning is required.
     (d)  Scripts consist of data as hard core. 
      (e)  Scripts are robust and require less maintenance.
     (f)   Scripting knowledge and programming knowledge is required.

    3. Shared scripting:
   - In this scripting technique, the scripts represent the behavior of the application that is shared among the other scripts. 
    - The functionality is scripted as shared scripts which are then called by the other scripts. 
    - Using technique can make the scripts modular in terms of the functionality that is common.
    - Other features of this scripting technique are:
    (a)  Structured scripts.
    (b)  Scripts define test cases.
    (c)  Low development costs.
    (d)  More planning required.
    (e)  Low script maintenance.

    4. Data driven scripting: 
  - In this scripting technique, the data is kept separated from the scripts and stored in to the external repository as files. 
   - We can say that these scripts are constituted of just programmed code. 
   - Other features of this scripting technique are:
   (a)  Scripts are programmed.
   (b)  Scripts are structured.
   (c)  Test scripts define test cases.
   (d)  High development costs when compared to shared scripting.
   (e)  High programming skills required.
   (f)  Data is isolated. Low script maintenance.
   (g)  Is used where both negative and positive data testing is required.

   5. Key word driven testing: 
   - This scripting technique develops scripts that are used to check and execute the operations that are maintained with the externalized data files. 
   - We can call it as an extension of the data driven scripting technique.  


Facebook activity