Subscribe by Email


Showing posts with label Data types. Show all posts
Showing posts with label Data types. Show all posts

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.


Friday, March 2, 2012

What are different interpreting data defects?

A software system or application can perform an assigned task only when it is capable of interpreting or analyzing the data. The proper analysis or interpretation of data is very much necessary for the proper execution of the task.
If the data interpretation itself is wrong, then you cannot expect the accurate results.

STEPS INVOLVED IN INTERPRETATION OF DATA
The interpretation of data involves the following steps:
- Inspection of data
- Cleaning of data
- Transformation of data
- Modeling of data

These steps are responsible for producing only the meaningful data with conclusions and any other supportive decisions. There are many approaches and facets of the data interpretation.

DATA INTERPRETING TECHNIQUES
- Data analysis employs various different data interpretation techniques in different domains.
- Following are some data interpreting techniques:
1. Data mining
These techniques are focused up on the modeling of data as well as descriptive purposes.

2. Business intelligence
- This interpreting technique is suitable for heavy data bases where a lot of aggregation work is required.
- This basically used in the business domain.

3. Statistical Analysis
Further comprises of two techniques namely exploratory data analysis (EDA, discovers new features), descriptive analysis and CDA or confirmatory data analysis (responsible for proving the existing hypotheses wrong).

4. Predictive Analytic
It is employed for predictive forecasting.

5. Text Analytic
It is used for extraction and classification of the data from various sources.

CATEGORIES OF DATA TYPES
Different data types employ different interpreting techniques. The data is classified in to the following categories:

1. Qualitative Data
Data denotes the presence or absence of a particular characteristic (passes/ fail).
2. Quantitative Data
Data is numerical either a continuous decimal number to a specified range or a whole counting number.
3. Categorical Data
Data from several different or similar categories.

DATA INTERPRETATION/ANALYSIS PROCESS
The interpretation or analysis of data is not a simple process and indeed involves complex processes. And complex processes are very much prone to defects and errors.
- In a data interpretation process, defects can exist in every phase.
- Let us start from the first step of the process and discuss the defects as we move down in the process.
- Data cleaning involves the removal of erroneous data.
- If the program performing the task of data cleaning itself is diagnosed with some defect, then it can let in some erroneous data which in turn can cause many defects in the whole process.
- The changes made in data should be retrievable and should be documented.
- It is recommended that the data to be analyzed should be quality checked as soon as possible since the defective data is the cause of many defects in the interpretation process.
- There are several ways of checking the quality like:
# Descriptive statistics
# Normality
# Associations
# Frequency counts

- In some cases the values of data might be missing.
- This can also cause the whole interpretation process to hang up or falter or it can also come to a halt.
- In such a case the missing data can be imputed.
- Defects can occur if the data is not uniformly distributed.
- To determine this randomization procedure should be checked for its success.
- If you have not included a randomization procedure, you can use a non sampling randomization procedure.

SOME DATA DISTORTIONS
There are some possible data distortions that also give rise to data interpreting defects:
1. Item Non Response
The data should be analyzed for this factor in the initial stage of the data analysis itself. The presence of randomization does not matter here.
2. Drop Out
Like item non response, the data is to be analyzed for this also in the beginning itself.
3. Quality Treatment
The bad quality of the data should be treated with various manipulation checks.


Monday, October 10, 2011

Some details about Multi dimensional arrays in C...

An array can be defined as the collection of variables of the same type that are referenced by a common name. Arrays are of two types namely one dimensional arrays and multi dimensional arrays. One dimensional array consists of finite homogenous elements whereas a multi dimensional array is composed of elements each of which is itself an array. Arrays refer to a named list of a finite number n of similar data elements. Each of the data elements can be referenced respectively by a set of consecutive numbers, usually 0, 1, 2, 3, 4,….., n. the simplest form of a multi dimensional array is the two dimensional array.

You can declare a two dimensional array as follows:
Type array name [ rows ] [ columns ];

Where type is the base data type of the array having name name, rows, the first index, refers to the number of rows in the array and columns, the second index refers to the number of columns in t5he array. For example:

Int sales [ 5 ] [ 10 ] ;

The general form of array initialization is shown below:

Type array name [ size N ] = { value list } ;

The value list is a comma separated list of array elements values. The element’s values in the value list must have the same data type as that of the base type of the array.
Int days [ 5 ] = { 1, 2, 3, 4, 5 } ;

Character arrays can also be initialized as shown below:
Char string [ 10 ] = { ‘c’ , ‘a’ , ‘t’ ‘\0’ } ;

Multi-dimensional arrays can also be initialized in the same way as simple dimensions one. For example:
Int abc [ 3 ] [ 2 ] = { 1, 1,
2, 2,
3, 3 } ;

This can be done it the other way also :
Int abc [ 3 ] [ 2 ] = { 1, 1, 2, 2, 3, 3 } ;

A multi dimensional array of strings can be initialized as shown below:

Type array name [ size N ] = { value list } ;

Here type declares the base type of the array, the array name specifies the name with which the array will be referenced and size defines how many elements the array will hold. The size must be an integer value or integer constant without any sign. The value list is a comma separated list of array’s elements values. The element values in the value list must have the same data type as that of the base type of the array.

Int days [ 5 ] = { 1, 2, 3, 4, 5 } ;

Character arrays can also be initialized as shown below:
Char string [ 10 ] = { ‘c’ , ‘a’ , ‘t’ , ‘s’ , ‘\0’ } ;

Multi dimensional arrays are also initialized in the same as the single dimensional one. For example:
Int cube [ 3 ] [ 2 ] = { 1, 1,
2, 2,
3, 3 } ;

This can be done in the other way also:
Int abc [ 3 ] [ 2 ] = { 1, 1, 2, 2, 3, 3 } ;

A multi dimensional array of strings can be initialized as shown below:
Char abc [ 3 ] [ 2 ] = { “Sunday” , “Monday” } ;

C allows you to skip the size of the array in an array initialization statement. This is called unsized array initialization. C allows arrays of more than 2 dimensions. The exact limit of dimensions is determined by the compiler we are using.


Wednesday, September 14, 2011

Some details about pointers and strings in C...

There doesn’t exist anything in C like real strings. A string is an array. It can be defined as an array of characters. A string is terminated by a nul character “\0”. A string can be initialized normally as follows:

Char string[10];
String[0] = ‘c’;
String[1] = ‘a’;
String[2] = ‘t’;
String[3] = ‘s’;

Another way of initializing and declaring a string is as follows:
Char string[10] = “cats”;

The following statement asks compiler to allocate 10 bytes of memory for the string entered by the user. The string can store only 9 characters and the tenth one being used for “nul” character.

We can easily access strings and their constituent characters using character pointers. The string arrays are mostly used for storing char data type elements in the memory. The array of string pointers is preferred over two dimensional arrays of characters mainly for two reasons. The first reason is by implementing array of pointers, you can make more efficient use of available memory since it consumes lesser number of bytes for storing arrays of strings. The second main reason is that an array of string pointers makes the manipulation of strings easier. You can easily exchange the positions of strings in the array using pointers without touching their memory locations. This makes managing strings very convenient. Another way of initializing a string is by using pointers like

for example:
Char string[ ] = “cats”;
Char *a;

Here is a pointer pointing to the string “string”. Pointers are another suitable way to access string arrays and modify them as we want. Since strings are composed of characters, we should use pointers to characters. The types of the variable and the pointers must match otherwise an error will be generated. Be careful that you don’t use “&” (address of) operator to assign the address of a variable to the desired pointer. If you used it, the name of the array will be used as the address of that particular array. For this reason only we do not use “&” (address of) while passing a string to the function scanf(). For example see the following code:

Int a;
Char name[10];
Scanf(“%d%s”, &a, name);

The pointer allows us to access the required character in the string because we made it to point to that string. Functions can be passed to print labels and to call the function. Below is an example:

Void printlbl(char lbl[ ])
{
Printf (“the label: %s\n”, lbl);
}
int main()
{
char lbl2[] = "abc";

Printlbl(lbl2);

}

Now if we want to pass a pointer to the string array lbl2, we will use the following code:
Char *lblptr = lbl2;

The above declared pointer can be used in the function also like shown below:
Printlbl (lblptr) ;

After execution you will observe that both the statements give the same output. Now you will ask me why so? The answer for this is that when we pass an array as a parameter or an argument to a function, a pointer is automatically created without we knowing it and the arrays are passed by reference method automatically the way a pointer is passed. So the above written code can also be written the other way as follows:

void Printlbl(char *lbl)
{
printf("the Label: %s\n",lbl);
}
a code for dynamically allocated string is given below:
string = (char *)malloc(sizeof(char) * (len+1));

Some stings can be allocated dynamically. This is done when we don’t know how much long a string will go until the program is executed or when we don’t what size of string the user will enter.


Facebook activity