Subscribe by Email


Showing posts with label Copy. Show all posts
Showing posts with label Copy. Show all posts

Wednesday, May 8, 2013

Explain the concept of Spooling and Buffering?


Concept of Spooling

- In the field of computer science, the ‘simultaneous peripheral operations on – line’ has been shortened down to the acronym ‘spool’. 
- A SPOOL software such as that of the IBM’s ‘SPOOL system’ was used by the computer systems in the time period from late 1950 to early 1960. 
- From one medium to another, files could be copied using this software. For example:
  1. From tape to punch card
  2. From punch card to tape
  3. From tape to printer
  4. From one card to another card
- IBM released less expensive software called the IBM 1401 that from some time brought down the application of the spool software.
- The print spooling is the most common application of this concept.
- The documents to be printed are formatted and stored at an area of the disk and retrieved when the print command is given.
- The printer prints out these documents at its defined rate. 
- Typically, at a time only one document can be printed by a printer and for doing so it takes a few minutes or seconds depending up on how fast it is. 
Spooling speeds up this process, but how? 
- With a spool software many documents can be written to the print queue by the multiple processes without having to wait. 
- As soon as the process wrote its document in the spooling device, it was free to carry out the other tasks. 
- At the same time another process would handle the printing of the document. 
If there was no spooling, the processor would not be able to continue until and unless the pending process is finished. 
- This would lead to long waits during processing and thus making the paradigm inefficient.

Concept of Buffering

- The physical memory storage has a region where it temporarily stores the data when it is being sent to another location.
- Typically whenever data is taken from some input device such as a keyboard or a mouse, it is stored in the buffer before sending it to the processor or output device. 
- Buffers can be implemented either through some virtual data buffer or in a fixed memory location.
- In majority of the cases, implementation of buffers is done with software that point to some location in the physical memory and use faster RAM. 
- The data access from buffers is quite fast when compared to that of the hard disk drives. 
- Buffers are used wherever a difference occurs between the rate of receiving data and rate of processing it.
- It also occurs if the two data rates are variable such as in online video streaming, printer spooler and so on. 
- The timing in a buffer is adjusted with the implementation of a FIFO algorithm or we can say a queue in the memory. 
- This would allow at the same time to write the data at the one end and read it from another end and both being done at different rates.
- Buffers are used along with I/O to hardware like in transmitting and receiving data in a network, disk drives, playing some song on the speakers etc.
- Buffers used in telecommunication are called the telecommunication buffers and make use of a storage medium or buffer routine.
- This routine compensates for the two different rates while receiving and sending data. 
- Buffers are also used in making interconnections between digital circuits working at different rates, for making timing corrections, delaying transmission time and so on. 


Sunday, November 18, 2012

How to design and copy test cases in test director?


Application testing process is not the one that can be completed in a jiffy. It demands constant input in form of efforts, organization and maintenance. Well, all this becomes easy when you are assisted by mercury interactive’s test management tool.
Test director saves you a great deal of efforts for tasks such as requirements analysis, test planning, test execution, defect tracking etc. here in this article we are going to tell you how you can design as well as copy the test cases in test director. After the tests created for all the subjects have been added to the test plan tree and the basic test information has been defined, the test cases or the test steps are defined.
By defining them we mean that more details or step by step instructions are provided for how that particular test case is to be executed. Each step of a test case consists of two things namely:
1. Actions to be performed on the application under testing or AUT and
2. The expected results.

Test steps can be created either for manual tests or automated tests using test director. For manual testing it is said to be complete when you are done with the designing of the tests.
Then, the test execution can be straightaway be started by using the test plan tree. But in the case of the automated testing, an addition step is to create automated test scripts using any other mercury interactive tool such as Winrunner or some other third party tool.

Steps for designing test cases


Below mentioned are the steps that one can follow for designing a test case:
1. It has to be made sure that the test plan module is on display and if it is not click on the test plan tab to turn it on.
2. The test case for which you are about to design the test steps also needs to be displayed. You can do this by simply clicking on the name of that particular test.
3. Next you need to launch the design step editor by clicking on the ‘design steps lab’.
4. In the design step editor dialog box clicking on the new step button you will get a new step dialog box which will ask you enter a step name which is by default a sequential number.
5. Now for defining that step you require to fill up the following fields and click OK:
         a) Step name
         b) Description
         c) Expected result
6. Last step is to click OK which will close the design step editor and display the design steps.

How to copy the test cases?


In test director you get the option of copying the test cases either from the same project or from some other. Follow the below mentioned steps:
1. You need to turn on the design steps tab and select that particular test case from the test plan tree which you want to be copied.
2. Next step involves selecting the steps of the test cases which you want to be copied. You will observe a gray sidebar, position the mouse pointer there and you will see that the pointer changes to  ->. Now hold down the shift and select the steps you want to be copied.
3. By using the copy steps copy down all the selected steps.
4. Next paste the steps where you want them to be copied in the test plan tree by using the paste steps button in the design steps tab.


Wednesday, September 7, 2011

How are strings and arrays defined in C?

A string can be defined as a group of characters, usually letters of the alphabet. When C is either to compare a string with another string, output it, copy it to another string, or whatever, the functions are intended to do what they are called to do until a null, which is a zero, is detected. Such strings are often called an ASCII-Z string. C treats a string as an array termination with a NULL character. C does not have a separate data type for strings and so strings exist as the arrays of characters. An extra byte must be left to store the NULL “\0”. Strings are declared as the arrays of characters. For example:

char name[25];

Strings can be fully or partially initialized depending on the requirements of the user. For example:
char fill[10] = { ‘a’, ‘ ‘, ‘r’,’o’,’p’,’l’,’a’,’n’,’e’,’\0’ };

There exist certain predefined functions for modifying strings. The library cstring.h houses all these functions. Strcpy() is used to copy one string into another string. Strlen() is used to determine the length of the string. Strcmp() is function for comparing two strings i.e., which one is bigger in terms of length. Strcat() is used to concatenate two strings. The second string is appended to the end of the first string. Strrev() is used to reverse a string alphabetically.

An array is a C derived data type and can be defined as a collection of variables of the same data type that are referenced by a common name. All arrays consist of contiguous memory locations where the lowest address corresponds to the first element and highest address corresponds to the last element. Arrays are useful when quite many elements of the same data type are needed to be stored and processed. The numbers in [ ] are called indices or subscripts. A string itself is an array of characters. Arrays are of two types namely one- dimensional arrays and multi dimensional arrays. Multi dimensional array comprises of elements which themselves are arrays. The general form of an array declaration is as follows:

Type array-name [size];

Here type states the data type of the array elements. The array name declares the name of the array, and finally the size defines how many elements will be there in the array. The data type of the array is called the base type.

A multidimensional array consists of M*N elements where M is the number of rows and N is the number of columns. It can be declared as follows:

Type array-name [rows][columns];

Where single dimensional arras can be read using a single loop, it takes nested loops to read and access the elements of a multi dimensional array. One loop is used to process the rows and the other one is used to process the columns. The arrays can be initialized during the run time as follows:

Type array-name [size 1]……….[size N]= {value list};

The value list consists of the array elements. C allows you to skip the size of arrays in an initialization statement. These types of arrays are called unsized arrays. For example:
Int abc[ ] = {1,2,3,5,7};

The best way to assign values to an array is using a "for" or "while" loop because it’s not affordable to write a separate initialization for every element. Arrays can be passed s parameters to the functions to maintain a structured design. Always keep in mind that in C subscripts start from 0. A string from an array of strings can be accessed by using pointers. But keep in mind that pointers hold only address of the strings. From there it is able to obtain the whole chunk of the contiguous memory.


Facebook activity