Subscribe by Email


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


Tuesday, June 25, 2013

Explain about demand paging and page replacements

These are two very important concepts of memory management strategies in the computer operating systems namely demand paging and paging replacements. 

About Demand Paging
- Demand paging is just the opposite concept of the anticipatory paging. 
Demand paging is actually a memory management strategy developed for managing the virtual memory.
- The operating system that makes use of demand paging technique, a copy of the disk page is made and kept in the physical memory whenever a request is made for it i.e., whenever a page fault occurs. 
- It is obvious that the execution of a process starts with none of its page loaded in to the main memory and follows by a number of page faults occurring one after the other until all of its required pages have been loaded in to the main memory. 
- Demand paging comes under the category of the lazy loading techniques. 
This strategy follows that only if the process in execution demands a page, then only it should be brought in to the main memory. 
- That’s why the strategy has been named as demand paging. Sometimes it is even called as the lazy evaluation. 
- Page table implementation is required for using the demand paging technique.
- The purpose of this table is to map the physical memory to the logical memory. 
- This table uses a bit wise operator for marking a page as valid or invalid. 

The following steps are carried out whenever a process demands for a page:
  1. An attempt is made for accessing the page.
  2. If page is present in the memory the usual instructions are followed.
  3. If page is not there i.e., is invalid then a page fault is generated.
  4. Memory reference to a location in the virtual memory is checked if it is valid or not. If it’s an illegal memory access then the process is terminated. If not the requested page has to be paged in.
  5. The disk operations are scheduled for reading the requested page in to the physical memory.
  6. Restarting the instruction that raised the page fault trap.
- The nature of this strategy is itself of great advantage. 
- Upon availability of more space in the physical memory, it allows execution of many processes leading to a decrease in the context switching time.
- At the time of program start up, less latency occurs during loading. 
- This is because the inflow and outflow of the data between main memory and secondary memory is very less.


About Page Replacement
- When less number of real memory frames is available, it leads to invoking a page stealer. 
- This stealer searches through the PFT (page frame table) for pages to steal. 
This table stores references to the pages which are required and modified. 
- If the requested page is found by the page stealer, it does not steal it but the reference flag is reset for that page. 
- So in the pass when the page stealer comes across this page, it steals this page. 
- Note that in this pass the page was flagged as un-referenced. 
- Any change made to the page is indicated by means of the modify flag.
- If the modify flag of the page to be stolen is set, then a page out call has to be made before the page stealer does its work. 
- Thus, the pages that form a part of the currently executing segments are written to so called paging space and the persisting segments are in turn written to the disk. 
- The page replacement is carried by the algorithms called the page replacement algorithms. 
- Besides this, these also keep a track of the faults. 


Thursday, May 30, 2013

What are the various Desk Scheduling methods?

About Disk Scheduling

The I/O system has got the following layers:
  1. User processes: The functions of this layer including making I/O calls, formatting the I/O and spooling.
  2. Device independent software: Functions are naming, blocking, protection, allocating and buffering.
  3. Device drivers: Functions include setting up the device registers and checking their status.
  4. Interrupt handlers: These perform the function of waking up the I/O drivers up on the completion of the I/O.
  5. Hardware: Performing the I/O operations.
- Disk drives can be pictured as large 1 – D array consisting of logical blocks that are smallest unit of transfer.  
- These blocks are mapped in to the disk sectors in a sequential manner. 
Mapping is done in the same manner. 
- The responsibility of using the hardware efficiently is the duty of the operating system for the disk drives for increasing the speed of access and bandwidth of the disk. 

Algorithms for Scheduling Disk Requests

There are several algorithms existing for the scheduling of the disk requests:

Ø  SSTF: 
- In this method the request having the minimum seek time is selected from the present head position. 
- This method is a modification of the SJF (shortest job first) scheduling and therefore contains some possibility of process starvation.

Ø  SCAN: 
- From one end of the disk, the disk arm starts and continues in the direction of the other end, serving to the requests till the opposite end. 
- At this end the head is reversed and the process continues. 
- This is sometimes called as the elevator algorithm.

Ø  C – SCAN: 
- A better algorithm then the previous one. 
- This one offers a more uniform waiting time than the previous one. 
- The movement of the head is from one end to another while it services the requests encountered along the way. 
- However, the difference is that when it comes to the other it straightaway goes to the beginning without heeding to any of the requests in the way and then again starts. 
- The cylinders are treated as the circular list wrapped around last and the first cylinder.

Ø  C – Look: 
- This is a modified version of the C – SCAN. 
- Here the arm or the head travels only up to the last request rather than going till the far end. 
- Then immediately the direction is reversed and the process continues.

- For disk scheduling it is important that the method be selected as per the requirements only. 
- The first one is the most commonly used and appeals to the needs naturally. 
- For a system where often there is a heavy load on the disk, the SCAN and C- SCAN methods can help. 
- The number as well as the kind of requests affects the performance in a number of ways.
- On the other hand, the file – allocation method influences the requests for the disk services. 
- These algorithms have to be written as an individual module of the OS so that if required it can be replaced with a different one easily. 
- As a default algorithm, the LOOK or the SSTF is the most reasonable choice. 

Ways to attach to a disk

There are two ways of attaching the disk:
Ø  Network attached: This attachment is made via a network. This is called the network attached storage. All such connected storage devices together form the storage area network.
Ø  Host attached: This attachment is made via the I/O port.


All these disk scheduling methods are for the optimization of the secondary storage access and for making the whole system efficient. 


Wednesday, May 22, 2013

What are Address Binding, Dynamic Loading and Dynamic Linking?

In this article we shall discuss about three interrelated concepts namely address binding, dynamic loading and dynamic linking.

1. Address Binding: 
- There are two types of addresses for the computer memory. 
- These are called the physical address and the logical address. 
- A physical memory location is allocated to a logical pointer by address binding process.
- This is actually nothing but associating the physical address and the logical address with each other. 
- Sometimes logical address is also referred to as the virtual address. 
- This concept is an important part of the memory management. 
- Operating system is responsible for carrying out address binding on behalf of the applications and programs that need an access to the memory. 
- A program cannot be executed without bringing it to the main memory. 
- The instructions of the program have to be bound to right address spaces in the physical memory. 
- Address binding is simply a scheme for performing this job. 
- It can be thought of as something similar to address mapping. 
- Address binding can be carried out at any of the following times:
Ø  Compile time
Ø  Loading time
Ø  Execution time

- In execution time binding, whenever the program requires access to memory, it has to go through a register called the relocation register and is similar to the base register. 
- Then the offset is added. 
- But in binding during the loading time, same thing is done but every time this register need not be evaluated. 
- The addresses are mapped at the time of loading the program in to the memory. 
- If there is a change in the base address, the whole program has to be reloaded.

2. Dynamic Loading: 
- This mechanism is very useful for a program as it helps it do the following things:
Ø  Loading library in to the main memory.
Ø  Retrieving the address of the variables and routines that are contained in the library.
Ø  Accessing those variables and executing those routines.
Ø  Unloading the library.
- Dynamic loading is very much different from the load time linking and static linking. 
- Dynamic loading allows a system to start up even of the libraries are absent. - It also helps in discovering the absent libraries and then gaining the additional functionality. 
- Dynamic loading is a very transparent process since it is the operating system that handles it. 
- Main advantages are firstly, it helps in fixing the patches at once without having the need for re-linking them and secondly, it provides protection to the libraries against modification that is not authorized. 
Dynamic loading find its major use in the implementation of the software plugins.
- It is also used in the implementation of the computer programs where requisite functionality is supplied by the different libraries and user has the freedom to select the libraries he/ she wishes to provide.

3. Dynamic Linking: 
- This is an important part of the binding process. 
- The purpose of the dynamic linking is resolving the references or symbols and links to the library modules. 
- This process is carried out by a linker program. 
- This programs searches for a set of library modules in some given sequence. 
This process takes place during the creation of the executable file. 
- The resolved references may be addresses of the jump calls and the routines. - These may in different modules or in the main program.
- Dynamic linking resolves them in to relocatable address or fixed address through allocation of the memory to each of the memory segment of the referenced module. 


Thursday, September 13, 2012

What is QTP? What is meant by logical name of the object?


Quick test professional or QTP as it is commonly called is the creation of Hewlett Packard with a purpose of carrying out regression as well as functional testing. 
This quick test professional software or we can say it test automation suite was developed as an integral part of the quality center tool suite of Hewlett Packard. This test automation suite was developed so that it can be used for enterprise quality assurance. 
The quick test professional sports a scripting and key word interface featuring a GUI or graphical user interface. 
VBScript or the visual basic scripting edition is what is used by the quick test professional:
  1. For writing specifications for a test procedure.
  2. For manipulating the controls of the software system or application under test.
  3. For making changes to the objects present in the software system or application.
Whether or not the software system or application is working as required, is verified by the quick test professional by means of what are called the “check points”. These check points are added to the test by the users themselves as a means for checking for the presence of a text, bitmap or an object in the software system or application. 
There are currently nine types of check points that are offered by the quick test professional for checking various aspects of the application software like:
  1. Properties of an object
  2. Records within a data base
  3. Data within a table
  4. Bitmap image
  5. Text present on the application screen and so on.
The 9 types of check points are namely:
  1. Standard check points
  2. Image check points
  3. Table check points
  4. Page check points
  5. Text check points
  6. Text area check points
  7. Bit map check points
  8. Data base check points
  9. Accessibility and XML check points
The exception handling in quick test professional is facilitated by using the recovery scenarios. Data driven testing or DDT is also supported by the quick test professional by implementing it as a Microsoft excel work book which is accessible by the quick test professional. 
Two types of data tables are provided by the quick test professional namely:
  1. Global data sheets and
  2. Local or action data sheets

What is meant by logical name of the objects?

- For the identification purpose the logical names are used by the quick test professional in place of the object’s actual names. 
- The logical name of any object is assigned to it based on which class it is in. But in most of the cases the logical name of the object is the label that it has. 
Logical name can be thought of as a very meaningful way of representing the description of a GUI object in software like winrunner and quick test professional.
- The GUI objects in winrunner and quick test professional are recognized by the means of their logical names instead of using the whole physical description provided by the user. 
- The logical names of the objects are assigned by the winrunner or quick test professional itself depending up on which one you are using. 
- The objects from the AUT are learned by the quick test professional and the description is stored in the object repository along with a logical name for each of them. 
- These logical names are also required by the VBScript for generating code whenever the recording takes place. 


Monday, July 23, 2012

What is the difference between the graphical user interface testing and usability testing?


There are different types of testing and graphical user interface testing and usability testing are two of them. In this article we have taken up the discussion regarding two types of testings mentioned in the heading plus the differences between them.
Though the graphical user interface testing and usability testing sound quite similar to one another but they are quite different from each other. First we shall discuss about these two types individually and later we shall see the differences between them. 

Graphical User Interface Testing


- Graphical user interface or GUI testing is all about checking the graphical user interface of a developed software system or application as a measure for ensuring that it holds up to its specifications as mentioned in its documentation. 
- The GUI testing is carried out with the help of several varying test cases. 
- The generation of good and effective test cases depends a lot on the certainty of the test designers regarding whether or not the test suite designed by them will cover the over all functionality of the software system or application under question.
- It also depends on the extent up to which the designed test suite exercises the graphical user interface of the software system or application. 

Usability Testing


- Usability testing is more like an interaction design centered on the users for the evaluation of the software system or application.
- The usability testing has been known for giving the direct input regarding the usage of a particular software system or application by the real world users.
The usability testing actually falls in contrast with the other available usability inspection methods since in these methods the methods used for the evaluation of a graphical user interface are quite different.
- The primary focus of the usability testing is on the capacity of the human designed software system or application to fulfill its intended purpose. 
- The outcome of the usability testing is actually a measure of the ease with which the software system or application can be used. 
- Usability testing falls under the category of the black box testing. 
- The basic goal of the usability testing is to measure the following four aspects mentioned below:
  1. Efficiency
  2. Accuracy
  3. Recall and
  4. Emotional response
- Usability testing is carried with the aim of observing the users using the software system or application in order to catch the errors and spot the areas where improvement can be made. 

Differences between Graphical User Interface Testing & Usability Testing


Difference #1:
The purpose of the graphical user interface testing is to see the look and feel of a particular software system or application differs in different operating system. On the other hand the purpose of the usability testing is to make it convenient for the users to use the software system or application.

Difference #2:
Graphical user interface testing involves making confirmations regarding whether or not the software system or application adheres to its design requirements checking on the aspects like:
         a)   Colors
         b)   Fonts
         c)   Control placements and so on.
On the other hand the usability testing goes much deeper in to the above mentioned aspects like whether or not the controls have been arranged in a logical sequence.

Difference #3:
In Graphical user interface testing the tests are executed to check the following:
        a)  whether or not the standards are in place,
        b)   All the screen validations namely navigation conditions, validation 
conditions, aesthetic conditions and so on.
Usability testing involves asking questions like:
       a)   Is navigation intuitive enough?
       b)   Does the GUI make sense to the user? Etc.


Friday, April 27, 2012

What is meant by correct filtering of user input?


Security is the top priority, be it any type of application or software. It has an importance that keeps growing with every phase of the software system or application development. Its importance is also reflected in the open source and commercial projects. Security is a very vast topic and there are many ways to implement and maintain security for all the stages. The data filtering of user input is one such way and this article is focused on this.

About Filtering of User Input


Being practical, almost all the applications or software systems depend on some external input or data to process and give out output or to start some process. 
- This input or data is supplied by the user or in some cases by some other applications (may be bots, web services clients, and scanner and so on). 
- Nobody knows what might be the nature of the user input, it can be either harmless or it can be malicious. - So it becomes mandatory for every developer to filter out this incoming foreign data.
- Input filtering is one of the important processes of the security mechanism of any application software and is independent of the environment and language.
- Today there are so many tools available that serve the purpose of filtering the input or data, for example, CGI for Perl.
- Foreign data can constitute of anything ranging from a web form to the results of the data base queries and also cookies, files, web services data, environment variables, server variables and so on. 
- The filter tools support all these kinds of user inputs. 
- The testing, validation as well as filtering of the custom or user input data every now and then can be quite annoying as well as time and effort consuming task. 
- It is quite common that while testing the tester may forget to write a test and if written also it might be incomplete.
- The filtering tools and extensions help curb these types of traps. 
- Usually filter tools follow two types of filtering methodologies:
  1. Logical filtering: It involves a strong and stringent analysis of the input data, checking for the correctness of the formats and the expected type is returned if the data passes the test.
  2. Sanitizing filtering: It involves determining whether or not to allow certain characters in a string. The data format is really not cared about in this type of filtering and a string is always returned.

How can filters be useful?


- It is quite a misconception that filters provide an object oriented interface. It is not so. 
- There are some filters that are also capable of turning ordinary line breaks in to effective HTML tags.
- Using the filters you can decide which input formats are to be made available to the users or you can put up a default format. 
- While the application is working up on the user input, keeping it as secure as possible prevents many security hazards.
- One of the most severe security risks is encountered whenever the full HTML is posted without being filtered.
- Most of the PHP filters are considered to be dangerous as they allow the execution of the code driven queries and other things on the data base of the web site. 
- For better input filtering, one needs to explore the modules for installing special filters that allow one to embed references to other resources, videos and so on. 
- Input filtering is much similar to filtering water for drinking and other uses.
- In some of the cases the application functions with the malicious data also, this leads to a kind of robustness of the application. 


Wednesday, March 21, 2012

Cause-Effect Graphing is a black box testing - Explain?

So many testing techniques have been categorized under the black box testing and the cause effect graphing is one of them and that is what the whole article is all about.

- A directed graph created for the purpose of mapping of the set of causes to a set of effects is nothing but a cause effect graph.
- The causes mapped in the graph are merely the input to a software system or application and the effects can be thought of as the corresponding outputs.
- The right of the cause effect graph houses all the effects with their corresponding nodes and the left side shelters all the causes and along with their corresponding nodes.
- A graph representing causes and effects in such a way is said to be a typical cause effect graph.
- It may also make use of certain intermediate nodes for the representation of the relation between the input and the output using the logical operators like AND, OR etc.
- The constraints can be effectively added to the effects and causes in the graph and these represented as the labelled edges using a dashed line along with the symbol of the constraint.

Constraint Symbols for the Causes:
1. E – exclusive
2. OaOO – one and only one
3. I – at least one

- The first constraint is used to state that at any instant any two causes (say cause 1 and cause 2) cannot be true simultaneously.
- The second constraint i.e., the inclusive constraint is used to state that at least one of the two or more numbers of causes must be true.
- The third constraint “one and only one” is used to state that the only one among all the constraints can be true.

Constraints for the Effects

1. R – requires
2. M – mask

- These are the only two valid constraints for the effects.
- The first one states that if one of the causes is true, then it implies that the other one also must be true and it also states that only one of the two constraints can be true and other can be false.
- The second constraint i.e., the mask constraint states just the opposite of the first constraint i.e., if one of the effects is true, then the other must be false.

"One point to be noted here is that the mask constraint only relates to the effects rather than relating to the causes like other constraints."

The direction of the graph is represented as shown below:
Causes -> Intermediate nodes -> Effects

Normal Forms of Cause Effect Graph

The cause effect graph is always rearranged in such a way that at any point between any input and output there lays only one node. Two normal forms of the cause effect graph have been identified:

- Conjunctive normal form
- Disjunctive normal form

When is Cause Effect Graphing performed?

One of the main purposes of the cause effect graph is the generation of the reduced decision table. The cause effect graphing is performed after the following tasks have been completed:

1. All the requirements have been reviewed to check out for any ambiguity.
2. All the requirements have been reviewed for their content.
3. It has been ensured that the requirements are complete and correct.

Cause effect graphing is basically used for hardware testing, but now it has been adopted for the use in the software testing.

It takes in to consideration only the desired external behaviour of the system and therefore it has been categorized as a black box testing technique and only selects the test cases that represent a logical relation between the causes and effects for the production of the test cases.


Tuesday, March 13, 2012

What are different aspects of Compounded SQL injection attack?

Till now so many types of SQL injection attacks have been identified. But, there is one type of SQL injection type which results in to different kinds of combinations of the other SQL injection attacks. This type of SQL injection attacks are commonly known as the compound SQL injection attacks.

This type of SQL injection attack has been derived from rigorous research and experimenting with the different SQL injection attack vectors putting them in different combinations with the various other web application attacks.

Some of the most commonly employed combinations are:

1. SQL injection + XSS cross site scripting
2. SQL injection + DDos attacks
3. SQL injection + insufficient authentication
4. SQL injection + DNS hijacking

Compounded SQL Injection Attack

- SQL is a language developed for interacting with the data base of the applications and web sites.

- The functions are mainly defined to retrieve the data from the data bases or to update the contents of the existing data bases.

- It uses compound conditions basically that make use of AND or OR.

- A compound statement is used to group all the other statements so as to constitute an executable block.

- SQL variables can be declared in an atomic compound statement that has been dynamically developed.

- A compound statement can be easily embedded in to SQL functions, SQL methods, trigger etc.

- To invoke a dynamic compound statement no privileges are required, although the authorization ID of the compound statement needs to include all the privileges required invoking the other SQL statements that form a part of that particular compound statement.

- Most of the compilers compile the compound statements as one single statement since this technique proves effective for the short scripts that do not require little control flow logic though a great data flow.

- For larger scripts or constructs, it’s better to use the SQL procedures.

- The “discretize” function is quite a simple one and is often used for the classification and modification of the data and gives back a NULL value for the malicious data.

- Later this malicious data is cleansed up by the compound statement.

- Most of the mechanisms can be elaborated using the technique of multi stage cleansing.

- The advantage of the compound statement is that here the FOR loop neither does open up a cursor nor the single row inserts are treated so.

- Here the underlying logic is of a multi table insert that has been selected previously.

- This advantage is reaped by compiling the dynamic statement as a single one.

- In contrast to this dynamic compound statement, there’s another type called Compounded SQL embedded statement.

- These statements can only be embedded in to the applications.

- In contrast to the dynamic statements, these cannot be prepared dynamically.

- These statements do not required any special privileges for invocation.


Tuesday, March 6, 2012

What are different methods and techniques used for security testing at white box level?

It requires a great deal of efforts to harness a good level of security. To obtain good security statistics one has to follow a proper approach to the testing. Like for any other kind of software testing one need to decide for security system also that who will carry out the testing and what approach has to be followed. Carrying out the security testing at the white box level is not at all easy as it is very complex and detailed.

APPROACHES FOR SECURITY TESTING AT WHITE BOX LEVEL
Basically till now two basic approaches have been identified for the security testing at the white box level and these have been mentioned below:

1. Functional Security Testing
- This approach to testing is usually followed by the standard testing organizations. - It deals with the checking of the features and functionalities of the software system or application for determining that whether or not they are working as stated. - This sounds like a very classic approach to security testing.

2. Risk Based Security Testing
- This is a more traditional approach to security testing and is followed usually by the quality assurance staff.
- This approach is quite difficult as compared to the previous mentioned approach.
- The main problem here is of the expertise of the testers since this approach calls for great skills in testing.
- Firstly to design the security tests which can completely exploit the vulnerabilities are difficult to be designed since for this it is required that the tester thinks like an attacker.
- Secondly, the security tests do not exploit the security of the software system or application directly and this causes a problem to observe the outcomes of a security test.

ABOUT SECURITY TESTING AT WHITE BOX TESTING LEVEL

1. A security test carried out without much precaution and logic can cause the whole security testing go wrong and this in turn can lead the software tester to carry out even more complicated test processes to counteract such a situation.

2. Risk based testing requires more skills than experience.

3. Most of the security testing methodologies or techniques that we use at the white box level are traditional and some of them have become out dated.

4. On the other hand the security exploitation techniques used by the attackers have become sophisticated day by day and the traditional methods used to cope these issues are becoming extinct.

5. Security testing at both the black box level and white box level tend to have a better understanding of the software system or application but different approaches are followed at both the levels.

6. The different approach followed by them is decided on the basis of the access of the source code i.e., whether or not the tester is having access to source code.

7. Security testing at the white box level is concerned with the rigorous analyzation of the source code of the software program as well its design.

8. It basically deals with finding the errors in the security mechanism of the software system.

9. In very rare cases it happens that this approach involves the matching of the patterns and automation of the whole testing process by implementing a static analyzer.

10. One peculiar drawback has been discovered for this kind of testing which is that this kind of testing sometimes may report a bug in some part of the software but actually there exists no such bug.

11. But still security testing at white box level using static analysis methods and techniques proves good for some software systems and applications.

12. Risk based testing calls for a lot of understanding of the whole software system.

13. After all, the product security is very much essential to the reputation of the company.


Thursday, September 8, 2011

How is program controlled in C?

Every program follows a control path. C program control constructs are conditionals and loops. Almost every program needs to go through some sort of decision making. Decision making processes are simulated in C using conditionals. We can state a conditional as a statement that instructs the compiler to execute a function or statement if a certain condition is proved true. Decision making is done on the basis of some logic. Logic is treated as arithmetic by C compiler. The value 0 stands for true and rest any other value stands for a false value. The most common conditionals are if-else statements, switch case statements and loops.

If-else statements are used for conditional branching. It starts with if followed by an expression in its parentheses. The enclosed expression is evaluated and if the condition proves out to be true the succeeding statement is executed. If the condition is false the succeeding statement is skipped. Break and continue statements are used in if else and switch case constructs. Break will cause the execution to jump out of the loop and execute the following immediate statements whereas continue statement causes the loop to execute again and again until the condition is proved false.

Switch case begins with keyword switch followed by a variable to be switched enclosed in a parentheses. The word case is used to begin each case followed by a variable for that case, then a colon and then by the statements to be executed. Statements will be executed until a break is found. Any of the above constructs can be nested. Now coming to the go to statement, with this goto statement you can jump in between anywhere in a program except you are not allowed to jump in a loop. Goto statements are mostly risky but if there’s a place in the program where a goto statement fits , feel free to use it. However you should not be used.

Let’s define the loops now. C has 3 types of loops namely the while loop, for loop and the do while loop. The “while loop” continues to execute till the condition proves to be false. It’s an entry controlled loop which means that the loop will execute only when the condition is met. In this loop the keyword while is followed by some expression in parentheses, followed by a compound statement enclosed in braces. After reaching at the end of the loop, the control goes back to the top and the condition is revaluated.

Do while loop is an exit controlled loop. The test condition is evaluated at the end only. So even if the condition is false the loop is executed once compared to the while loop which doesn’t allows execution even once if the condition is false. You can call the do while loop as a pos check loop. This is the main difference between the while loop and the do while loop. These loops can also be nested. Nesting is unlimited. The “for loop” is the easiest loop. All its loop controlled elements are gathered at one place while in other loops they are scattered everywhere in the program. In a for loop firstly the initialization expression is executed. Then, the test expression is evaluated. If it’s true, the body of the loop is executed. After the execution the update expression is implemented, the test expression is again evaluated. If it’s true the whole sequence is repeated. You should use a for loop hen you have to repeat a block of statements specific number of times. These are the tools that programs need to perform repetitive tasks and make decisions.


Tuesday, September 6, 2011

What is Assignment and Logical Comparison in C...

An expression as we all know is composed of one or more operations. When the expression is terminated by a semi colon, it becomes a statement which is the small executable unit in any program. The assignment statements are used to assign a value to a variable. The assigned value can be a constant variable or an expression. An assignment statement can be written in general form as:

A=bcd;

Where A is a variable to whom we are assigning a value and bcd is the assigned value. The “=” sign is called assignment operator. Assignments can be chained together. The assigning operator “=” assigns the value to the left hand operand and returns the value of the assignment. Assignment statements are very much needed for variable initialization since variables are initialized using assignment statements. There are 2 ways to do this:
- Un-initialized variable
- Initialized variable
An un-initialized variable has to be initialized in separate statements whereas an initialized variable combines declaration and assignment in to one statement.

Examples are:
Int a;
a=3; ------------------------uninitialized variable
int a= 3; -------------------- initialized variable

Assignment also follows when you use dynamic initialization. Sometimes variables of different types are mixed with each other. It’s a very common and observed phenomenon. In such cases a type conversion takes place. Here also it follows from the principal of assignment statement that “the value of the right side of the expression or of the assignment is converted to the type of the variable on left side i.e., target variable. Both the sides of assignment should be compatible with each other for type conversion. When conversion takes place from smaller data type to a larger data type no data is lost. Precedence of operators while assigning values with an expression should always be kept in mind.
Some programs need the power of decision making or comparison. This is granted through logical expressions which are nothing but the statements resulting into a 0 (true) or 1 (false) value. These are a combination of constants, variables and logical and relational operators. Be careful that two or more variables and operators should not occur in continuation. A logical expression may contain just one signed or unsigned variable or a constant or it may have two or more also joined by varied relational and logical operators. Following are some valid logical operators: the logical OR operator (||), the logical AND operator (&&) and the logical NOT (!) operator. The OR operator combines 2 expressions as its operands. If either of its operand evaluates to true, the OR operator also evaluates to true. This operator is basically used for testing evaluating expressions. The AND operator combines 2 expressions into one and the operator evaluates to one if and only if both the operands evaluate to 1. The NOT operator works on a single operand since it is a unary operator. It is used to negate or reverse the truth value of the operand. It has a higher precedence than of the relational and logical operators. Therefore, this should be enclosed within parentheses. This operator is useful as a test for zero. OR and AND operators have lower precedence than relational operators. Relational operators are used to define relationships between variables. C provides 6 basic relational operators : < (less than), > (greater than), <= (less than or equal to), >= (greater than or equal to), == (equal to), and != (not equal to). Do not confuse the = and the == operators. “=” is assignment operator whereas “==” is relational equality operator.


Monday, July 25, 2011

Designing Conventional Components- Graphical Design Notation and Tabular Design Notation

A set of constrained logical constructs that emphasize on maintenance of functional domain are used for designing conventional components. These logical constructs are sequence, condition, and repetition. Structured programming is a design technique that constrains logic flow to three constructs: sequence, condition, and repetition. These structured constructs help in reducing the complexity of the program and enhances readability, test ability and maintainability.

GRAPHICAL DESIGN NOTATION
- Activity diagram is a descendant of flowchart in which all elements of structured programming are represented.
- In a flowchart, each step in the process is represented by a different symbol and contains a short description of the process step.
- Structured programming constructs should make it easier to understand the design. If unnecessary complexity is introduced by using them without violation, it is better ti violate them.
- Dogmatic use of structured constructs introduces inefficiency.

TABULAR DESIGN NOTATION
- Decision tables translates actions and conditions into a tabular form.
- A decision table is used when a complex set of conditions and actions are encountered within a component.
- Decision table is divided into four quadrants. Upper left quadrant lists all conditions. Lower left quadrant lists all actions. Right hand quadrants form a matrix indicating condition combinations and corresponding actions


Friday, April 22, 2011

Software Test Case Design Methods - Black Box Testing Methods

Black box testing focuses on:
- testing thefunctional aspect of the software.
- input conditions are derived that will test all functional requirements.
- set of test cases that finds incorrect or missing functions.
- interface errors.
- data structure errors.
- external database excess errors.
- performance errors.
- initialization and termination errors.

Black box techniques include:


- Graph based testing is a black-box testing technique that uses objects that are modeled in software and the relationships among these objects. Steps involved in designing test cases using graph based testing are:

STEP 1: Create a graph of software objects and identify the relationship of these objects.
STEP 2: Traverse the graph to define test cases.

- Equivalence Testing
A black box testing technique which divides the input domain into partitions or into sets of data from which test cases can be derived. These test cases are used to uncover errors. It makes use of equivalence classes which are sets of valid and invalid states that an input may be in.

- Boundary Value Testing
It is a black box testing method that uses the boundaries of the input domain to derive test cases. If input condition specifies range bounded by n and m, the test cases that can be derived use values n and m, just above n and m, just below n and m.

If input condition specifies number of values, the test cases that can be derived are use the minimum, use the maximum, just above and below minimum, just above and below maximum.


Monday, April 11, 2011

Software Test Case Design Methods - White Box Testing Methods

Software is tested in two ways:
- First approach is test the internal workings of software. It is also called white box testing.
- Second approach is to test the software as a whole, i.e., know how the software works and tests if it conforms to the specified functionality in the requirements. It is also called black box testing.

White Box Testing Techniques


It is a test case design technique that uses the internal control structure of the software component. It is also called glass box testing. It ensures that no logical errors, incorrect assumptions and typographical errors have been missed. The test cases that are included are testing all logical conditions, loops, independent paths, internal data structures. Techniques involved are:

- Basis Path Testing
It enables the test case designer to derive a logical complexity measure based on the procedural specification of a software component.
STEP 1: Use a procedural specification as input in deriving the basic set of execution path.
STEP 2: Draw the flow graph of the procedural specification.
STEP 3: Compute for the complexity of the code.
STEP 4: Determine the basic set of execution paths.
STEP 5: Document the test cases based on the identified execution path.

- Control Structure Testing
A white box testing technique that tests three types of program control - condition testing, loop testing and data flow testing.
Condition testing test the logical conditions contained in a procedural specification.
Looping testing is a method that focuses exclusively on the validity of iterative constructs or repetition.
Data Flow Testing method selects test paths of a program according to the locations of the definitions and uses of variables in the program.


Facebook activity