Subscribe by Email


Showing posts with label Location. Show all posts
Showing posts with label Location. Show all posts

Sunday, June 30, 2013

Explain the single and two level directory structures

About Directory Structure
- Directory structure is referred to the way that the operating system follows for displaying the files and file system to the user in the field of computing. 
- A hierarchical tree structure is used for displaying the files in a typical way. 
- The special kind of string the file name uses or the unique identification of a particular file that is stored in the computer’s file system. 
- Before the 32 bit operating systems actually came in to the scenario; short names of about 6 to 14 characters in size were used for the file names. 
However, the modern operating systems give permission for file names of longer length i.e., of 250 character and that too per path name element. 
- The drive:\ is the root directory in the operating systems such as the OS/2, windows and DOS for example, “C:\”. 
- The “\” is the directory separator but the forward slash “/” is also internally recognized by the operating system.
- A drive letter is use for naming the drives either physically or virtually. 
- This also implies there does not exist a root directory that is formal. 
- Rather, we have root directories in each drive that are independent of each other. 
- However, one virtual drive letter can be formed by combining in to one. 
- This is done by keeping a RAID setting of 0 for the hard drive. 
- The file system hierarchy standard is used by the operating systems such as the UNIX and other UNIX like systems. 
- This is the most common form for the directory structures used by the UNIX operating systems. 
- It is under the root directory “/” that all the files and the directories are stored even if they are actually present on a number of different physical devices.

About Single – level Directory
- This is the simplest of the directory structures. 
- All files are stored in the same directory itself because it is quite easy to understand as well as support. 
- The first computer of the world i.e., the CDC 6600 also operated on just one directory and it could be used by a number of users at the same time. 
- There are significant limitations of the single-level directory. 
- These limitations come in to play when there are more than one users using the system or when the system has to deal with a large number of files. 
- All the files have to be assigned unique names since they are all stored under the same directory. 
- No two files can have the same file name. 
- It may become difficult to keep the names of the files in mind if they are large in number.


About Two–level Directory
- The limitations of the single level directory structure can be overcome by creating an individual directory for every user. 
- This is the most standard solution for the problems of the single level directories. 
- In this two-level directory structure, a UFD or user file directory is made for every user. 
- The structure of all the user file directories is almost the same, but the difference is that only the files of the individual user are stored in one.
- When a user tries to log in or when he starts a task, the system searches for the MFD or master file directory. 
- The name of the user or his/ her account number is used for indexing the MFDs in the operating system. 
- Each of those entries points to the UFD belonging to that user. 
- When a reference is made to some file, the system only searches for the user file directory for example, when a file has to be deleted or created. 


Sunday, June 23, 2013

Explain the various File Operations

A number of operations can be carried out on a file. However, there are 6 basic file operations. As we know a file is an ADT or abstract data type. Certain operations need to be considered for defining a file. Operating systems makes calls to these operations. 

Following are the six basic operations:

1. Creation of a file: 
- This operation involves two steps. 
- Firstly, a sufficient space has to be found for storing the file in the file system. - Secondly, for this new file an entry should be made in the directory.

2. Writing to a file: 
- For writing data to a file, a system call has to be made with name and the data to be written as its arguments. 
- A writer pointer is kept by the system at the location in the file where the next write operation is to be carried out. 
- This pointer is updated whenever a write operation occurs.

3. Reading from a file: 
- Just like the write operation, in order to read information from a file, a system call has to be generated along with the name of the file and the location of the content to be read as its arguments. 
- Here, instead of a write pointer there is a read pointer that will indicate the location where the next read operation is to take place. 
- The location at which the current operation is being carried out is kept as a “per – process current – file – position” pointer since the process is either writing to or reading from the file. 
- The same pointer can be used by both the read and write operations in order to reduce the complexity of the system as well as for saving space.

4. Re-positioning within a file: 
- System carries out search in the directory looking for the appropriate entry. 
When found, the current file position pointer is re-pointed to this position. 
This file operation does not require carrying out any input or output operation in actual. 
- Another name for this file operation is the file seek.

5. Deletion of a file: 
- For deletion of the file, the system searches through the directory to find the appropriate entry. 
- When found, the space held by this file is released and the entry in the directory is destroyed so that this space can be reused by other files.  

6. Truncating a file: 
- Sometimes you may require deleting only the contents of a file while keeping it attributes. 
- Deleting the file and recreating it is not an efficient solution. 
- This file operation lets you to erase the contents of the file but save its attributes.
- But here the length attribute of the file will be changed to zero after truncation. 
- The file space is released after truncating.


The above mentioned six basic file operations constitute the minimal file operations set. These operations are primary ones and if combined can perform some other secondary file operations such as copying. A table known as the open file table is maintained by the operating system that stores all the information about the files that are currently open. When the file is closed, its entry is deleted from the open file table. Some files have to be opened explicitly with the function open() before using it. The name of the file is passed as an argument to this function. Then it looks in the directory for this file and an entry is made in the open file table.  Each file has some access rights. It is in these access modes that a process uses the file. A process can perform only those operations which are permitted by the access rights of the file. 


Friday, May 3, 2013

What is a Dispatcher?


A number of types of schedulers are available that suit the different needs of different operating systems. Presently, there are three categories of the schedulers:
  1. Long-term schedulers
  2. Medium-term schedulers
  3. Short-term schedulers
Apart from the schedulers there is one more component involved in the scheduling process and is known as the dispatcher. 
- It is the dispatcher that gives a process power to control the CPU. 
- To which process this control is to be given is selected by the short-term scheduler. 
- This whole process involves the following three steps:
  1. Switching the context
  2. Turning on the user code
  3. Making a jump to the exact location of the program from where it has to be restarted.
- Values taken from the program counter are analyzed by the dispatcher and accordingly it fetches instructions and feeds data in to the registers. 
- The dispatcher unlike the other system components needs to be very quick since it is invoked during all the switches that occur. 
- Whenever a context switch is invoked, the processor gets in to an idle state for a very small period of time. 
- Hence, it is required that the context switches that are not necessary might be avoided. 
- The dispatcher takes some time for stopping one process and start running the other one. 
- The dispatch latency is what we call this time.

- Scheduling and dispatch are complex processes and interrelation to each other. 
- These two are very much essential for the operation of the operating system. 
Today, architectural extensions are available for the modern processors that provide a number of banks of registers.
- Swapping of these registers in hardware is possible and therefore a certain number of tasks are capable of retaining their full registers. 
- Whenever an interrupt triggers the dispatcher, it sends to it the full set of the registers belonging to the process that was being executed at the time of occurrence of the interrupt. 
- Here, the program counter is not considered. 
- Therefore, it is important that the dispatcher should be written carefully for storing the present states of the registers on being triggered. 
- In other words, we can say that for the dispatcher itself, there is no immediate context. 
- This saves it from the same problem. 

Process of Dispatcher

Below we try to describe in simple words what actually the process is.
  1. The program presently having the context is executed by the processor. Things used by this program include stack base, flags, program counter, and registers and so on. There is a possible exception of the reserved register that is native to the operating system. The executing program does not have any knowledge regarding the dispatcher.
  2. For dispatcher a timed interrupt is triggered. Here the program counter jumps to the address listed in the BIOS interrupt. This marks the beginning of the execution of the dispatch sub routine. The dispatcher then deals with the stacks and the registers etc. of the program that raised the interrupt.
  3. Dispatcher like the other programs consists of some sets of instructions that operate up on the register of the current program. These instructions know everything of the previously executed programs. Out of these, the first few instructions are responsible for storing the state of the program.
  4. Dispatcher next determines which program should be given the CPU next for executing. Now it deletes all the statistics of the previously executed state and fills in the details of the next process to be executed.
  5. Dispatcher jumps to the address mentioned in the program counter and establishes a full context on the processor.
- Actually dispatcher does not really require registers since its only work is to write the current state of the CPU in to a memory location that has been predetermined. 
- It then loads in to the CPU another process from other predetermined location. 


Saturday, April 20, 2013

Explain the concepts of threads and processes in operating system?


Threads and processes are an important part of the operating systems that have features of multi–tasking and parallel programming. These come under the sole concept of ‘scheduling’. Let us try to understand these concepts with the help of an analogy.

- Consider the process to be a house and threads are its occupants. 
- Then, process is like a container having many attributes. 
- These attributes can be compared to that of a house such as number of rooms, floor space and so on. 
- Despite having so many attributes, this house is a passive thing which means it can’t perform anything on its own. 
- The active elements in this situation are the occupants of the home i.e., the threads. 
- The various attributes of the house are actually used by them. 
- Since you too live in a house you must have got an idea how it actually works and behaves. 
- You do whatever you like in the house if only you are there. 
- What if another person starts living with you? You just can’t do anything you want to do. 
- You cannot use the washroom without making sure that the other person is not there. 
- This can be related to multi – threading. 
- Just as a part of estate is occupied by the house, an amount of memory is occupied by the process. 
- Just as the occupants are allowed to freely access anything in the house, similarly the occupied memory is utilized by the threads that are a part of that process i.e., the access to memory is common. 
- If one process allocates some memory, it can be accessed by all other threads also. 
- If such a thing is happening, it has to be made sure that from all the threads, the access to the memory is synchronized. 
- If it cannot be synchronized, then it becomes clear that the memory has been allocated specifically to a thread. 
- But in actual, things are a lot more complicated because at some point of time everything has to be shared. 
- If one thread wants to use some resource that is already under use by some other thread, than that thread has to follow the concept of mutual exclusion. 
An object known as the mutex is used by the thread for achieving exclusive access to that resource. 
- Mutex can be compared to a door lock. 
- Once a thread locks this, no other thread can use that resource until the mutex is again unlocked by that thread. 
- Mutex is one resource that a thread uses. 
- Now, suppose there are many threads waiting to use the resource when mutex is unlocked, the question that arises now is that who will be next one to use the resource. 
- This problem can be solved by either deciding on the basis of length of wait or on basis of priority. 
- Suppose there is a location that can be accessed by more than one threads simultaneously.
- You want to have only a limited number of threads using that memory location at any given point of time. 
- This problem cannot be solved by mutex but with another resource called semaphore. 
- Semaphore with a count of 1 is the resource that can only be used by one thread at a time. 
- In semaphore of greater count more threads can access it simultaneously.  
- It just depends up on how you characterize or set the lock.


Monday, October 22, 2012

What is the built-in recovery system in Silk Test?


With the in – built recovery system of the silk test automation tool it has been made possible to restore the application under test to its stable state which it was in before it crashed, failed or hanged. The stable state to which the recovery system of the silk test restores the application under test or AUT is called the base state of the application software. 

The test automation counterpart of the silk test i.e., the winrunner does not support this feature. The recovery system comes in to action whenever the application under test fails ungracefully. 

For client server based applications there are 4 major tasks that are carried out by the built – in recovery system of the silk test. Those 4 major tasks have been listed below:
  1. Ensuring the continuous running of the web browser.
  2. Restoring the application back to its default size if it has been minimized by the user.
  3. Setting the working status of the application as active.
  4. Closing the other dialog boxes or child windows that have popped up.
On the other hand the below mentioned are the tasks that are carried out by the built – in recovery system of the silk test for the application software that are browser based:
  1. Waiting for the browser to restore itself to the active mode if it has been inactive for a long time.
  2. Ensuring that the various below mentioned elements are displayed:
a)   Status bar
b)   Text field
c)   Location
d)   Browser tool bars and so on.

- The data regarding this built – in recovery system is stored in a file by the name of defaults.inc which can be found in the same directory where the silk test has been installed. 
- Most of the actions that are carried out on the application under test are when the application is in the default base state. 
- In this state, all the actions are based up on the default properties.
- So, whenever a test case or script is executed the recovery system gets invoked automatically.
- However, the flow of control is different when the tests are run based up on some main function or a test plan. 
- Here, when a test case starts executing via the silk organizer the same test case gets the control first. 
- But before the execution of any test case, a function is called namely “default test case enter”. 
- This function is called with the purpose of calling the set app state function which in turn will invoke the default function “default base state”. 
- Following this the execution of the test case begins. 
- In any of the either cases the control is passed to the default test case exit function:
  1. If the test case finishes with its execution or
  2. If the test case encounters an error while execution
- The default test case exit function keeps the record of the logs for the exceptions in the test case execution and later calls the set base state function which in turn calls the default base state function. 
- Whenever the tests are run via a main function instead of one two recovery functions are invoked in the same way. 
- But here the difference is that instead of calling default test case center the function called is “default script enter” before the scripts start running. 
- The value of this function is NULL by default. 
- When the last test case has finished executing the “default script exit” function is called. 
- The purpose of this function is to log the errors or faults that occurred outside the test case. 


Wednesday, October 3, 2012

How would you export a Script from one PC to another in QTP? Can launch two instances of QTP on the same machine?


While working on a collaborative project in quick test professional it becomes necessary to import some scripts from one machine to another. But how this to be done will be discussed and also how two instances of quick test professional can be launched on the same machine.

Exporting a script from one PC to another

- If you would have noticed the quick test professional comes with a tab titled “export”. 
- For doing so just mark the code that you want to export, copy and paste it in a text file. 
- The copied code may consist of references repository items, part of tests, part of settings, parameters, environment variables and so on. 
- However, it is another fact that the export option is not directly available in the quality center’s test script lab.
- A suitable version of quick test professional needs to be installed. 
- Then, you need to connect it to the quality center project. 
- Next step would be to open the test via quick test professional. 
- Once you are done with these 3 basic steps you can now export the file via “export to zip file” feature of the quick test professional either in to the quick test professional data base or some other location and either on the same machine or on some different machine. 
- One may have a bulk of test automation quick test professional scripts on a local machine which might be required to be exported from local machine to  QC. 
- Exporting some times becomes necessary when there are too many scripts and it takes a whole lot of time to open each and every script and then save it in the quality center.
- Some third party tools are available which serve the purpose of uploading many quick test professional scripts at once from one PC to another PC.  
- There is one more method which makes use of the “generate script” function that comes in built with the quick test professional. 
- This function is available in the object identification section under test settings, tools and options tab. 
- Using this function of the quick test professional, a zip file of the scripts to be exported can be created. 
- The zip file of the specified scripts is created at the source computer itself. 
Later, this zip file can be easily exported to quick test professional on destined computer.

Now let us answer the second question of this article regarding the launch of two instances on the same machine. 
- The answer is no since the quick test professional only has the ability of working with the multiple instances of the AUT or application. 
- An example of this can be multiple windows of the internet explorer browser that can be handled by the quick test professional. 
- Therefore, at a time only a single instance of the quick test professional can be launched on the same machine. 
- To say, actually two instances cannot be launched on the same machine but yes you can go for virtualization option. 
- Today, there are many tools available for virtualization such as sandboxie, Altiris SVS and so on. 
- These two tools have been used for running two Mozilla Firefox profiles on the same PC and for testing some software in isolated PC environment but have not been put to use for launching two instances of the quick test professional on the same machine. 
- But the possibilities are that these two tools can be used for running multiple instances of quick test professional on the same machine. 


Sunday, September 30, 2012

What is the difference between check point and output value in QTP?


Check point value and output value are two very familiar terms in the field of quick test professional. In this article we will be discussing about output value and check point value and also about the differences between them. But before we discuss the differences let us know about what the check points and output values really mean. 

What is a Check Point?

- Whether a web site or web application that is currently under test is working as expected or not, is known with the help of a check point.
- This is done so by making comparison between the expected values of the properties and current values for the same properties.  
- Whenever a check point is added by the user, a similar check point is added by the quick test professional to the current row displayed in the key word view.
- In the expert view, an equivalent check checkpoint statement is added. 
- All this is default process and the name of the test object on which the check point is added is supplied as a name to that particular check point also by default. 
- The name of the check point can be changed as per the needs. 
- Below mentioned are the types of check points:
  1. Image check point
  2. Standard check point
  3. Table check point
  4. Bit map check point
  5. Text check point
  6. Accessibility check point
  7. Data base check point
  8. Page check point
  9. Xml check point
- Return value of a check point in quick test professional is always of Boolean type i.e., it is either true or false. 
- If the return value of the check point is found to be zero then the statement following it, is executed otherwise the further execution is cancelled. 
- The check points of the quick test professional have a very limited scope therefore the best option is to use self created check points wherever possible. 
Check point is one of the key functional testing features among others provided by the quick test professional. 
- “Check” method is used by quick test professional for working up on the check points.
- If the return value of a check point has to be retrieved than it is compulsory that you add parenthesis around the name of the check point present in the check point.

What is a Output Value?

- Output value step captures a value of a property of an object which is then termed as an output value. 
- This value is captured at a specific point and can be stored at any desired location. 
- These output values then can be used to serve as inputs at several different points of the test script.
- As required the user can select and output multiple properties of an object. 
There are 4 typical types of output values:
  1. Text output value: Text content present in the bitmap can be retrieved.
  2. Text area output value: It is used for outputting text strings with a defined area of the screen.
  3. Standard output value: Number of properties pertaining to an object can be retrieved.
  4. Xml output value: It is obtained from resources and applications containing xml content stored in some specific column although the run session.
  5. Data base out put value: This output value facilitates the checking of the content present in the data table and has been stored in a particular column during the run session.
- The output values are stored only till the duration of the run session ends and are obtained from AUT.
- Output values are suppose to have a dynamic nature.


Wednesday, September 19, 2012

What are the types of environment variables in QTP?


The quick test professional comes with a whole lot of environment variables and under many types. In this article we are going to discuss about the same but first let us focus what actually these environment variables are. 

What are Environment Variables

- The environment variables have come to be termed as “dynamic named values” which have the ability to affect the way the processes behave on a computer system while in execution phase.
- With the environment variables an operating environment is created in which the applications or processes are supposed to run. 

We give an example to make it easy for you to understand the concept of environment variables:
- Suppose a particular system uses a particular location for storing its temporary files. 
- This location can be designated with an environment variable having a standard name. 
- This location may differ from computer to computer. 
- This environment variable can be accessed by any of the processes using the standard name assigned to it. 
- This mechanism makes sure that the process stores the temporary files in a directory or a folder that surely exists and has sufficient place for storing the data. 
- In systems having UNIX or UNIX like operating systems each process is provided with its own set of environment variables.

More about Environment Variables
- Whenever a process is created from its parent process a duplicate environment of the parent process is inherited by the child process by default. - However, the explicit changes are not inherited. 
- From command shells, the environment variables can be changed by the user by an indirect invocation or by using the below stated notation:
ENVIRONMENT _ VARIABLE  = VALUE
- Even the operating systems like MS- DOS, Microsoft windows etc come with environment variables. 
- However, all of these do not make use of the exact same environment variables. 
- For the purpose of configuration, the values of these environment variables can be used by the running processes. 
- Below we are stating some common examples of the environment variables:
  1. HOME
  2. USER PROFILE
  3. PATH
  4. TERM
  5. MAIL
  6. TEMP
- For the batch files as well as the shell scripts the environment variables serve the purpose of communicating the preferences to child processes and data. 

Environment Variables in QTP

Now we shall see the concept of environment variables in quick test professional. 
- In quick test professional the environment variables are more like global variables which can be accessed by any part of the test script.
- The values of the environment do not change by any number of the iterations but yes they can be changed by modifying them in the script. 
- The basic advantage of the environment variables is that they can be used or shared across several reusable actions. 
- 2 types of environment variables have been defined namely:
  1. Built in environment variables and
  2. User defined environment variables.
- The first type of the environment variables defines the internal variables that are a property of quick test professional and hold valuable information like path of the folders, name of iteration, and version of the operating system and so on.
- The user defined environment variables can be further defined in to 2 types namely:
  1. User defined internal: variables defined within the test and accessible only within the test and
  2. User defined external: Variables predefined in the external environment variable file.
Below mentioned are the built in environment variables in quick test professional:
  1. ActionName
  2. ActionIteration
  3. OS
  4. OSversion
  5. ProductName
  6. ProductVer
  7. ResultDir
  8. TestDir
  9. UserName
  10. TestName
  11. UpdatingActiveScreen
  12. UpdatingCheckPoints
  13. GroupName
  14. ScenarioID
To get the values from the environment variables during the run time you should know the path of the folder where the test is located. 


Friday, August 17, 2012

How does Winrunner identify GUI Objects?


We all are familiar with the functional testing tool that has been developed by the mercury interactive known by the name of winrunner. In this article we are going to discuss one of the important aspects of the winrunner i.e., how the GUI objects are identified by the winrunner. 

How does WinRunner identify GUI objects?

- The software testing conducted by the winrunner is based up on the identification of the graphical user interfaces objects present in the software system or application under testing.
- The identification of the GUI objects takes place in the context sensitive recording mode. 
- In such recording, the application can be tested by the point of view of the user i.e., in the terms of the graphical user interface objects like buttons, windows, menus, lists and so on. 
- Each of these GUI objects have their own individual properties that are known to define their appearance as well as behavior.
- These properties are learnt by the GUI and are used in identification and location of the GUI objects while a test is in execution. 
- In this mode there is no need for the winrunner to know the physical location of a GUI object for its identification. 
- There is a tool called GUI spy which you can install on your system and properties of any of the GUI objects present in your software system or application that is to be tested can be known very quickly and easily. 
- All the information recorded by the winrunner regarding the behavior of the GUI objects is stored in the GUI map.
- While a test is in execution, this GUI map provides a lot of help in locating a particular object. 
- Actually, the information or the object description is read by the winrunner from the GUI map and then it searches for an object with same properties in the software system or application that is being tested.
- The tester can even have a view of the GUI map in order to know the scenario of the GUI objects that are present in their software system or application.
- The GUI map is actually many small GUI map files added together. 
Two modes have defined for the organization of the GUI map files:
  1. Default mode: A GUI map file is created for the whole application software or separately for each window in the application software. A common GUI map file can be referred by multiple tests. This mode holds good for the users who are quite experienced with the winrunner.
  2. Global GUI map file mode: In this mode the GUI map files are automatically created by the winrunner for every test that is created by the user. This mode holds good for the users who are new to the winrunner since it is quite simple.
- In many cases what happens is that the interface of the software system or application under testing changes  but this is not a reason to worry since the winrunner provides solution for this also. 
- The tests that you created for the previous interface can be used for the next interface also. 
- You just need to delete, add or edit the object descriptions in the GUI map so that the same can be located by the winrunner in the modified software system or application. 
- The tests are created by the scripts that have been either recorded or programmed. 
- These test scripts are constituted of the TSL (test script language by mercury) statements. 
- A logical name is given by the winrunner for every object to help in the identification process which is actually a nick name or an alias for the description of the GUI object. 


Tuesday, February 15, 2011

Interface Analysis - Analysis of Display Content and Work Environment

ANALYSIS OF DISPLAY CONTENT


User tasks lead to the presentation of variety of content.Content can be character based reports, graphical displays, specialized information. Analysis modeling techniques identify the output data objects. During this step, the format and aesthetics of content are considered.
To determine format and aesthetics of content, steps that are followed are:
- can user customize screen location for content?
- is proper on-screen identification assigned to all content?
- how is color used to enhance understanding?
- how will error messages and warnings presented to user?
- how is report partitioned for ease of understanding?
- are different types of data assigned to consistent geographic locations on screen?

ANALYSIS OF WORK ENVIRONMENT


People do not work in isolation. They are always influenced by the activity around them. In some applications, the user interface is placed in a user-friendly location but in others lighting and noise may be a factor, a keyboard or mouse may not be an option. in addition to physical environment factors, the work place culture also is important.Can system interaction be measured? Will two or more people share information before input is provided? Many such questions should be answered before interface design commences.


Saturday, January 15, 2011

Project Management - The W5HH Principle

Barry Bohem suggested an approach that addresses project objectives, milestones and schedules, responsibilities, management and technical approaches and required resources. This is called W5HH principle. The questions that are answered in this principle are:

- Why is the system being developed?
- What will be done by When?
- Who is responsible for a function?
- Where are they organizationally located?
- How will the job be done technically and managerially?
- How much of each resource is needed?

WHY IS THE SYSTEM BEING DEVELOPED?
It enables the parties to assess the validity of business reasons for the software work. It justifies the expenditure of people, time, and money.

WHAT WILL BE DONE?
It specifies the task set required for the project.

WHEN WILL IT BE DONE?
It helps to determine the project schedule. It helps in determining when tasks are conducted and when milestones are reached.

WHO IS RESPONSIBLE FOR A FUNCTION?
It helps to accomplish the role and responsibilities of each member of the software team.

WHERE ARE THEY ORGANIZATIONALLY LOCATED?
The software team does not contain all the roles and responsibilities. The customers, users and stakeholders also have responsibilities.

HOW WILL THE JOB BE DONE TECHNICALLY AND MANAGERIALLY?
The management and technical strategy of project is defined once the scope of the product is established.

HOW MUCH OF EACH RESOURCE IS NEEDED?
It helps in deriving estimates based on the answers to the above questions.


Facebook activity