Subscribe by Email


Showing posts with label String. Show all posts
Showing posts with label String. 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. 


Friday, August 24, 2012

How do you invoke an application using TSL?


Test scripts of all the tests that are created via the winrunner are composed in a special programming language developed by the mercury interactive called the test script language or TSL. 
The generation of the test scripts in test script language (TSL) takes place while the recording of the test is in progress. Each line of the winnrunner test script that is written in TSL language is called a TSL statement and like in other languages each statement ends in semi colon. 
Most of the features of the TSL make it much like the C language but overall if we see, creating tests in TSL is quite easy as compared to writing tests in C. 

In this article we are going to discuss about how an application can be invoked using the TSL scripts.
- The TSL allows you to define a message in the test script of the test and have it delivered to the test results window through the winrunner. 
- For sending a message to the test results window, the below mentioned statement can be added in the test script:
Report_msg( message );
- The message may contain a variable, a string or a combination of both of them depending up on the desire of the user. 
- Applications can be started or invoked from a test script very easily. 
- The winrunner provides you a function for starting or invoking an application. - This function has been named as the “invoke_application” function. 
- The very presence of this function makes it quite easy for the testers to invoke the same or the other application that is being tested. 
- Mostly, it happens that you require to invoke the software application that is being test during the start up of the winrunner. 
- The application software that is being tested can be invoked very easily every time you start the winrunner software by just making an simple addition to the start up test that you are having at hand. 
- This addition is of the function that we discussed above i.e., the invoke_application. 
- The invoke_application can be added to the start up test and the application will be started by the winrunner.

(Startup tests or functions are those tests and functions which are run and executed by the winrunner before it starts running other main tests or functions. They mark the beginning of the winrunner testing.)

- If you are unable to add this statement to the test script of the start up test there is no need to worry as there is one more way for invoking the application being tested in winrunner.
-There is a “run” tab available in the test properties dialog box of the winrunner. 
- This run tab can also be used for invoking an application. 
- Clicking on this you can invoke the application at the beginning of some test run.
- If the run tab also fails then you have one more way of invoking the application being tested which involves the use of the system statement to start an application.
Now let us see what the syntax for the invoke_application function is, it has been stated below:
Invoke_application ( file, command_option, working_dir, show );

The explanation for the above function syntax can be given as following:
- The full path of the application software to be invoked is designated by the file.
- The command line options that are to be applied are designated by the command_option parameter.
- The working directory of the supplication software is designated by the work_dir.
- Lastly, what shall be the appearance of the main window of the application when it is open is designated by the show.


Facebook activity