Pages

Sunday, February 26, 2012

Mixed Topic3

Exchange server is used as office’s mail server. It collects all the mails and exchanges the mails to particular given mail address.
3 tier architecture consist of 3 well-defined and separate process , each running on diff platforms. Server , middleware, client
A hotfix is a code (sometime called a patch) that fixes a bug in a product.
In 2 tier architecture, the application logic is either buried inside the user interface on the client or with in the database on the server . eg file servers and database servers.
Simm = single in line memory
Dimm = dual in line memory
Forward lookup is: domain name to IP address.
Reverse lookup is:IP address-to-domain name.

SNMP Basics
SNMP stands for Simple Network Management Protocol and consists of three key components: managed devices, agents, and network-management systems (NMSs). A managed device is a node that has an SNMP agent and resides on a managed network. These devices can be 
routers and access server, switches and bridges, hubs, computer hosts, or printers. An agent is a software module residing within a device. This agent translates information into a compatible format with SNMP. An NMS runs monitoring applications. They provide the bulk of processing and memory resources required for network management.

Manager is installed in server …manager is configured to 162 port no
Agent is configured in client and port no 161 ….
Set is used to set some thing
Get is used to get the value
Traps are continuously send by agent to manager ie unsolicitedly..but if manager want some specific data it will do polling …so polling+ trapping is ultimate option
Polling is same as getnext
Snmp is configured on both client and server.

MIBs, OIDs Overview
MIB stands for Management Information Base and is a collection of information organized hierarchically. These are accessed using a protocol such as SNMP. There are two types of MIBs: scalar and tabular. Scalar objects define a single object instance whereas tabular objects define multiple related object instances grouped in MIB tables.
MIB files for specific devices or systems can be downloaded from here

OIDs or Object Identifiers uniquely identify managed objects in a MIB hierarchy. This can be depicted as a tree, the levels of which are assigned by different organizations. Top level MIB object IDs (OIDs) belong to different standard organizations. Vendors define private branches including managed objects for their own products.

Here is a sample structure of an OID
Iso (1).org(3).dod(6).internet(1).private(4).transition(868).products(2).chassis(4).card(1).slotCps(2)­
.­cpsSlotSummary(1).cpsModuleTable(1).cpsModuleEntry(1).cpsModuleModel(3).3562.3

Use cases of SNMP
SNMP (Simple Network Management Protocol) is a widely used protocol for network management and monitoring. It provides a standardized way for network administrators to monitor and manage network devices and their functions. Here are some common use cases of SNMP:

1. **Device Monitoring:**
   - SNMP allows network administrators to monitor the performance and status of network devices such as routers, switches, and servers. Information such as CPU usage, memory utilization, and interface status can be retrieved using SNMP queries.

2. **Fault Detection and Notification:**
   - SNMP enables the detection of faults and abnormal conditions on network devices. When a critical event occurs, SNMP traps or informs can be generated and sent to a network management system (NMS) to notify administrators of the issue.

3. **Configuration Management:**
   - SNMP can be used for configuration management by allowing administrators to modify the configuration of SNMP-enabled devices remotely. This includes adjusting parameters such as community strings, access control lists, and notification settings.

4. **Performance Monitoring:**
   - SNMP provides a mechanism for monitoring the performance of network devices over time. By collecting and analyzing SNMP data, administrators can identify trends, plan for capacity upgrades, and optimize the overall performance of the network.

5. **Bandwidth Monitoring:**
   - SNMP allows administrators to monitor bandwidth usage on network interfaces. This information is crucial for identifying network congestion, analyzing traffic patterns, and ensuring that sufficient bandwidth is available for critical applications.

6. **Security Auditing:**
   - SNMP supports security features such as community strings and access control lists. These features help ensure that only authorized entities can access and modify SNMP-enabled devices. SNMPv3, in particular, provides enhanced security features, including encryption and authentication.

7. **Inventory Management:**
   - SNMP can be used to maintain an inventory of network devices and their characteristics. This includes information about the hardware, software, and firmware versions of devices on the network.

8. **Environmental Monitoring:**
   - Some SNMP-enabled devices, such as environmental sensors and power distribution units (PDUs), provide information about environmental conditions such as temperature, humidity, and power consumption. This information is crucial for maintaining optimal operating conditions in data centers.

9. **Automation and Scripting:**
   - SNMP can be integrated into scripts and automation tools for network management tasks. This allows administrators to automate routine tasks, respond to specific events, and perform actions based on SNMP data.

10. **Vendor-Agnostic Monitoring:**
    - SNMP is a vendor-agnostic protocol, meaning that devices from different manufacturers can be monitored using the same SNMP-based monitoring solution. This interoperability is crucial in heterogeneous network environments.

In summary, SNMP plays a central role in network management by providing a standardized and extensible framework for monitoring, managing, and controlling network devices. Its flexibility and widespread adoption make it a key component in maintaining the health and performance of modern networks.


What is alternate of SNMP?
While SNMP (Simple Network Management Protocol) is widely used for network management and monitoring, there are alternative protocols and technologies that serve similar purposes or address specific limitations of SNMP. Some alternatives include: 1. **NETCONF (Network Configuration Protocol):** - NETCONF is a network management protocol designed to configure and monitor network devices. It uses XML-based data encoding and operates over a secure transport layer. NETCONF provides capabilities for configuration management, status monitoring, and software updates. 2. **RESTCONF:** - RESTCONF is an HTTP-based protocol that uses RESTful principles for network device configuration and monitoring. It is built on top of NETCONF but provides a more lightweight and web-friendly approach. RESTCONF uses JSON or XML for data encoding and can be accessed using standard HTTP methods. 3. **gRPC (gRPC Remote Procedure Calls):** - gRPC is a modern, open-source framework for remote procedure call (RPC) communication. It is designed for efficiency, scalability, and ease of use. gRPC can be used for communication between network management systems and devices, providing a more flexible and extensible alternative to SNMP. 4. **Syslog:** - While not a direct alternative to SNMP, syslog is a protocol used for collecting and forwarding log messages in a network. Syslog is commonly used for monitoring and troubleshooting network devices. It provides a way to centralize log information from various devices for analysis and alerting. 5. **Prometheus:** - Prometheus is an open-source monitoring and alerting toolkit designed for reliability and scalability. While not a protocol itself, Prometheus uses a pull-based model to collect metrics from various services and applications. It is often used in conjunction with exporters that expose metrics for monitoring purposes. 6. **IPFIX (IP Flow Information Export):** - IPFIX is a standard for exporting flow information from routers, switches, and other network devices to a collector for analysis. It provides a standardized format for representing flow data, offering insights into network traffic patterns and characteristics. 7. **SNMPv3 Enhancements:** - While SNMP itself remains widely used, SNMPv3 introduced enhancements in security, including authentication and encryption, addressing some of the security concerns associated with earlier versions. SNMPv3 provides a more secure option for those who rely on SNMP. It's important to note that the choice of a network management protocol depends on factors such as the specific requirements of the network, the types of devices in use, and the preferences of the network administrators. In many cases, a combination of protocols and technologies may be used to achieve comprehensive network monitoring and management.

what is shell in linux?
A shell is a program that provides the traditional, text-only user interface for Unix-like operating systems. Its primary function is to read commands that are typed into a console (i.e., an all-text display mode) or terminal window (an all-text window) in a GUI (graphical user interface) and then execute (i.e., run) them.

The term shell derives its name from the fact that it is an outer layer of an operating system. A shell is an interface between the user and the internal parts of the operating system (at the very core of which is the kernel).


what is lilo?
LILO is a versatile boot loader for Linux. It does not depend on a specific file system, can boot Linux kernel images from floppy disks and hard disks, and can even boot other operating systems. One of up to sixteen different images can be selected at boot time. Various parameters, such as the root device, can be set independently for each kernel. LILO can even be used as the master boot record.


What is Grub?
Grand Unified Bootloader (GRUB)”.A small software utility that loads and manages multiple operating systems (and their variants).


what is partition?
A partition is a section of a hard disk. When you format a hard disk, you can usually choose the number of partitions you want. The computer will recognize each partition as a separate disk, and each will show up under "My Computer" (Windows) or on the desktop (Macintosh).


  
What is a boot loader?
Most simply, a boot loader loads the operating system. When your machine loads its operating system, the BIOS reads the first 512 bytes of your bootable media (which is known as the master boot record, or MBR). You can store the boot record of only one operating system in a single MBR, so a problem becomes apparent when you require multiple operating systems. Hence the need for more flexible bootloaders.

The master boot record itself holds two things -- either some of or all of the boot loader program and the partition table (which holds information regarding how the rest of the media is split up into partitions). When the BIOS loads, it looks for data stored in the first sector of the hard drive, the MBR; using the data stored in the MBR, the BIOS activates the boot loader.

What is PAM?
(Pluggable Authentication Modules) A programming interface that enables third-party security methods to be used in Unix. For example, smart cards, Kerberos and RSA technologies can be integrated with various Unix functions such as rlogin, telnet and ftp.


What is default shell in linux?
default shell is bash shell


A Web server is a program that, using the client/server model and the World Wide Web's Hypertext Transfer Protocol, serves the files that form Web pages to Web users (whose computers contain HTTP clients that forward their requests). Every computer on the Internet that contains a Web site must have a Web server program.
Examples:
  • Microsoft's Internet Information Server, which comes with the Windows NT server;
  • FastTrack and Enterprise servers;
  • Apache, a Web server for UNIX -based operating systems.
Web servers often come as part of a larger package of Internet- and intranet-related programs for serving e-mail, downloading requests for File Transfer Protocol files, and building and publishing Web pages. Considerations in choosing a Web server include how well it works with the operating system and other servers, its ability to handle server-side programming, and publishing, search engine, and site building tools that may come with it.

Application Server

What is an application Server
Application servers are software that helps enterprises develop, deploy and manage large numbers of applications that are mostly distributed in nature.
From a developer's point of view, the central difference that an application server brings about is the separation of business logic from the presentation logic and the database logic. Essentially, application servers help us build true 3-tier applications where the database is logically separated (sometimes physically separated too) from the business logic.
Developing a server involves dealing with many complicated issues:
  • Concurrency
  • Providing access to all possible production databases
  • Network connection management
  • database connection pooling
  • Legacy database support
  • Designing a management console
  • Clustering support
  • Load balancing
  • Failover
  • Extensibility of your development framework and performance.
An application server can simplify your development process. Application servers usually take care of most, if not all the involved technical issues and allow developers to concentrate on the reason why the project came about in the first place - the business need. This allows one to budget for much larger and much more useful systems.
While application servers like BEA Weblogic, IBM Websphere or Microsoft BackOffice Server give you a great head-start in web and line-of-business application building, they are nonetheless very advanced and complicated products. Their application building frameworks are meant for use by advanced developers. The time involved in learning the essential technologies involved in the framework can be considerable.
As the diagram shows, Web sites built using the application server model consist of at least three back-end layers:
  1. Web Server Layer
  2. Application Server Layer
  3. Data Layer
In particular, the application server approach offers these advantages:
  1. provides a much thinner client. Even if you have some Java source code that you distribute to the users, it's very little.
  2. Scalable deployment architectures, deploy applications in scalable fashion to accommodate increasing user demands over time.
  3. integration with legacy data sources,in ways that leverage the key advantages of their application server architectures.
An application server can have deployed on it several different applications which function separately. eg: WebSphere

For our purposes we will concentrate on the combination of web servers and application servers interfacing for web applications(ie: using a web browser):
As more business-critical applications come to the web, the systems management and operational issues associated with Web development become crucial. The challenge of creating websites with reliability, scalability, stability, and manageability have to addressed.
How then can programmers deal with the problems of development an deployment.

A new model for Web development has evolved to address these development and deployment issues. Web application servers form a clear level of separation between the Web server and data access layers. As the diagram shows, Web sites built using the application server model consist of at least three back-end layers:
  1. Web Server Layer
  2. Application Server Layer
  3. Data Layer
SONET/SDH Basics
Synchronous optical networking commonly known as SONET and synchronous digital hierarchy (SDH) have been around for decades. SONET and SDH standards were developed for communicating digital information over optical fiber. The SONET specifications define optical-carrier (OC) interfaces and their electrical equivalents to allow for transmission of lower-rate signals at a common synchronous rate. These specifications were developed to replace the lower-rate T-Carrier/PDH systems, as they allow for the transport of large amounts of telephony and data traffic.
Optical Level
Electrical Level
Rate (Mbit/s) Line
Payload Rate (Mbit/s)
Overhead Rate (Mbit/s)
SDH Equivalent
OC-1
STS-1
51.840
50.112
1.728
STM-0
OC-3
STS-3
155.520
150.336
5.184
STM-1
OC-12
STS-12
622.080
601.344
20.736
STM-4
OC-48
STS-48
2488.320
2405.376
82.944
STM-16
OC-192
STS-192
9953.280
9621.504
331.776
STM-64
OC-768
STS-768
39813.120
38486.016
1327.104
STM-256

What is verification? validation?
Verification typically involves reviews and meetings to evaluate documents, plans, code, requirements, and specifications. This can be done with checklists, issues lists, walkthroughs, and inspection meetings. Validation typically involves actual testing and takes place after verifications are completed. The term 'IV & V' refers to Independent Verification and Validation.

Verification -> Are we building product right?
Validation -> Are we building right product?

- Verification evaluates documents, plans, code,
requirements, and specifications.
- Validation, on the other hand, evaluates the product itself.

- The inputs of verification are checklists, issues lists,
walkthroughs and inspection meetings, reviews and meetings.
- The input of validation, on the other hand, is the actual
testing of an actual product.

- The output of verification is a nearly perfect set of
documents, plans, specifications, and requirements document.
- The output of validation, on the other hand is the
actual/perfect product.

=> Verification comes before Validation.

QA= planning + REPORTing + quality ctrl + quality assessment+ qulaity improvement

Generally we follow Equivalence Class
Partition(ECP),Boundary value Analysis(BVA) and cause effect
Graph techniques to write test cases

Response
Meaning
 *
Timed out
 !H
router received packet but did not forward it
 N
network unreachable
 P
protocol unreachable
 U
port unreachable
.                   Each period indicates that the network server timed
                    out while waiting for a reply.
!                    Each exclamation point indicates the receipt of a
                    reply.
?                   Unknown packet type.
C                  A congestion experienced packet was received.
U                  A destination unreachable error PDU was received.
I                  The user interrupted the test.
!
Each exclamation point indicates receipt of a successful reply
.
Each period indicates the network server timed out while waiting for a reply
U
A destination unreachable error PDU was received
Q
Source quench (destination is too busy)
M
Could not fragment
?
Unknown packet type
&
Packet lifetime exceeded


Keyboard Shortcut
Action
Up Arrow
Displays your previous commands.  (command history)
TAB Key
Completes a partially typed CLI commands.
CTRL+Z
Takes you back to Privileged EXEC Mode. 
CTRL+A
Places the cursor at the beginning of a line.
CTRL+E
Places the cursor at the end of a line.
CTRL+R
Redisplays the current command line.
CTRL+W
Erases a word (behind the cursor).
CTRL+U
Erases an entire line.

Tips
Expression
Matches
[abc]
A single character: a, b, or c
[^abc]
Any single character but a, b, or c
[a-z]
Any character in the range a-z
[a-zA-Z]
Any character in the range a-z or A-Z (any alphabetical character)
\s
Any whitespace character [ \t\n\r\f\v]
\S
Any non-whitespace character [^ \t\n\r\f\v]
\d
Any digit [0-9]
\D
Any non-digit [^0-9]
\w
Any word character [a-zA-Z0-9_]
\W
Any non-word character [^a-zA-Z0-9_]
\b
A word boundary between \w and \W
\B
A position that is not a word boundary
|
Alternation: matches either the subexpression to the left or to the right
()
Grouping: group all together for repetition operators
^
Beginning of the string
$
End of the string

Repetition Operator
Meaning
{n,m}
Match the previous item at least n times but no more than m times
{n,}
Match the previous item n or more times
{n}
Match exactly n occurrences of the previous item
?
Match 0 or 1 occurrences of the previous item {0,1}
+
Match 1 or more occurrences of the previous item {1,}
*
Match 0 or more occurrences of the previous item {0,}

Option
Description
g
"Global" -- find all matches in the string rather than just the first
i
"case Insensitive" -- ignore character case when matching
m
"Multiline" -- search over more than one line if the text contains line breaks


A routing loop is a common problem with various types of networks, particularly computer networks. They are formed when an error occurs in the operation of the routing algorithm, and as a result, in a group of nodes, the path to a particular destination forms a loop.
In the simplest version, a routing loop of size two, node A thinks that the path to some destination (call it C) is through its neighbouring node, node B. At the same time, node B thinks that the path to C starts at node A.
Thus, whenever traffic for C arrives at either A or B, it will loop endlessly between A and B, unless some mechanism exists to prevent that behaviour.


How a routing loop can form

For example, in the network given below, node A is transmitting data to node C via node B. If the link between nodes B and C goes down and has not yet informed node A about the breakage, node A transmits the data to node B assuming that the link A-B-C is operational and of lowest cost. Node B knows of the broken link and tries to reach node C via node A, thus sending the original data back to node A. Furthermore, node A receives the data that it originated back from node B and consults its routing table. Node A's routing table will say that it can reach node C via node B (because it still has not been informed of the break) thus sending its data back to node B creating an infinite loop.



 How a routing loop can persist
Consider now what happens if both the link from A to C and the link from B to C vanish at the same time (this can happen if node C has crashed). A believes that C is still reachable through B, and B believes that C is reachable through A. In a simple reachability protocol, such as EPG, the routing loop will persist forever.
In a naive distance vector protocol, such as RIP, the loop will persist until the metrics for C reach infinity.(the maximum no. of routers that a packet can traverse in RIP is 15. 16 is considered infinity and the packet is discarded)

 Prevention and mitigations

In a link-state routing protocol, such as OSPF or IS-IS, a routing loop disappears as soon as the new network topology is flooded to all the routers within the routing area. Assuming a sufficiently reliable network, this happens within a few seconds.
Newer distance-vector routing protocols (BGP, EIGRP, DSDV, Babel) have built-in loop prevention: they use algorithms that assure that routing loops can never happen, not even transiently. Older routing protocols (RIP) do not implement the newest forms of loop prevention and only implement mitigations such as split horizon, route poisoning and holddown timers.

What is a Test Matrix?

Matrices provide an easy structure for testing common issues. A common issue is an issue that repeats itself from project to project. Testing a common issue should be relevant to the project itself.
Examples for common issues are:
  • Fields (integer, dates, time, etc)
  • File names
  • Printing
  • Saving a file
  • Deleting a file
  • Sending a file
  • Login process
  • UI issues
  • Other
Why is it important to learn "Test Matrix"?

There are several reasons why to learn and to do test matrices.
  • It can reduce working time - once you have a matrix for a specific issue, it will take you less time to test it or to think how to test it.
  • It is logical and testing challenging - It is a challenge to make your own matrix and to find common issues that are repeatable from project to project.
  •  In future projects it will save you time and it can give your more time to handle more complex issues.
  • It’s fun (for those who have a testing mania like the writer).
How to Do a Test Matrix?
The algorithm for creating a test matrix is:
  • Find an issue that repeats itself from project to project
  • Think of tests that you routinely perform on this issue
  • Sort all the tests and put them in a matrix
Example
Let’s build a matrix for integer field. First, we will think and write all the tests that we can perform on an integer field:
  • 0
  • Valid value
  • Lower boundary – 1
  • Lower boundary
  • Lower boundary + 1
  • Upper boundary – 1
  • Upper boundary
  • Upper boundary + 1
  • Nothing
  • Negative value
  • Special chars: < > ? , . / ; : ‘ “ [ ] { } \ | + = _ - ( ) * & ^ % $ # @ ! ~ `
  • Uppercase chars
  • Lowercase chars
  • Spaces
  • Leading spaces before the value
  • Value follows with spaces
  • Length lower boundary – 1
  • Length lower boundary
  • Length lower boundary + 1
  • Length upper boundary – 1
  • Length upper boundary
  • Length upper boundary + 1
  • Mix of digits, chars and spaces
Now we will insert them into a generic matrix:
Integer field matrix
Field Name


Cases


0


Valid value


Lower boundary – 1


Lower boundary


Lower boundary + 1


Upper boundary – 1


Upper boundary


Upper boundary + 1


Nothing


Negative value


Special chars: < > ? , . / ; : ‘ “ [ ] { } \ | + = _ - ( ) * & ^ % $ # @ ! ~ `


Uppercase chars


Lowercase chars


Spaces


Leading spaces before the value


Value follows with spaces


Length lower boundary – 1


Length lower boundary


Length lower boundary + 1


Length upper boundary – 1


Length upper boundary


Length upper boundary + 1


Mixed of digits, chars and spaces




Now let use it for a project that contains 2 integer fields: “Age”, “Price”. For each field we will mark those cases we want to test.
Integer field matrix
Field Name
Age
Price
Cases


0
X
X
Valid value
X

Lower boundary – 1
X

Lower boundary
X

Lower boundary + 1


Upper boundary – 1


Upper boundary
X

Upper boundary + 1
X

Nothing


Negative value
X

Special chars: < > ? , . / ; : ‘ “ [ ] { } \ | + = _ - ( ) * & ^ % $ # @ ! ~ `
X
X
Uppercase chars


Lowercase chars


Spaces
X

Leading spaces before the value


Value follows with spaces


Length lower boundary – 1
X

Length lower boundary
X

Length lower boundary + 1


Length upper boundary – 1
X
X
Length upper boundary
X

Length upper boundary + 1


Mixed of digits, chars and spaces
X




This method gives you the power to change in each test cycle the cases that need to be tested for those fields, without investing many efforts on changing the STD document.

Practice 1
Create a matrix for saving a file. Try to solve it before continue reading.
Practice 1 - answer

·         Save a new file
·         Save a file with an existing file name
·         Save in another format
·         Save a file to a full disk
·         Save a file to a write protected disk
·         Save a file to a remote disk
·         Save a large file and during the saving process print the file
·        

Practice 2
Create a matrix for a date field. Try to solve it before continue reading.

Practice 2 - answer
·         Insert chars
·         Insert numbers
·         Insert day/month 0
·         Insert day 32
·         Insert month 13
·         Insert year 90 (means 1990, 2090 ???)
·         Insert other format of dates:
24/12/1978 and 12/24/1978
·         Insert 16/9/2006 and 16.9.2006
·        
Practice 3
Create a matrix for login a system: username and password. Try to solve it before continue reading.

Practice 3 - answer

·         Correct username and wrong password
·         Wrong username and correct password
·         Wrong username and wrong password
·         Correct username and correct password
·         Correct username and password like ‘select 1’
·         Uppercase and lowercase
·        

Practice 4
Create a matrix for a char field with length x. Try to solve it before continue reading.

Practice 4 - answer
·         Similar to the integer example

Practice 5
Create a matrix for deleting a file. Try to solve it before continue reading.

Practice 5 - answer
  •  Delete a file
  • Delete a very large file
  • Delete an empty file
  • Delete an empty folder
  • Delete a folder with many files
  • Delete an open file
  • Delete a file while sending other files to the printer
  •  …
Practice 6
Create a matrix for testing an email field. Try to solve it before continue reading.

Practice 6 - answer
·         Insert a valid mail: a.a@a.com, a@123.co.il
·         Insert an invalid mail format
·         Insert chars
·         Insert numbers
·         Insert a very long email
·        
Practice 7
Create a matrix for testing a new screen that will be insert into the application. Try to solve it before continue reading.

Practice 7 - answer
·         Test typo in screen title, buttons, fields and tables.
·         Test that keyboard shortcuts work well when buttons are enable and lock when buttons are disabled.
·         Check sorting at least 3 times on each column.
·         If you have a search criteria, combine a search with several fields using a method named "all pairs".
·         Create a test where the search is bring you one row, 2 rows, more then 2 rows and 0 rows.
·         Create a test for clear the search (brings all rows).
·         Create a search where in string/text field you are trying to insert a word contains the sign ' - if the programmer didn't handle it and you are working with XML files or with databases, you will get an error.
·         If you can search by "starting with" or "contains with" test spaces and '.
·         Test that each button is working as expected.
·         Test the paging feature if you screen support in regular view and in searching results - sometimes there is a bug that paging in search result will bring the entire rows.
·         Ttest the "yes", "no", "cancel" options in message box.
·         Try to active/inactive a radio button and a check box field.
·         Test that mandatory fields are really mandatory and that the message about it is correct.
·         Test the close window button.

What is "Equivalence Class Partitioning"?
We define "Equivalence Class Partitioning" as a method that can help you derive test cases. You identify classes of input or output conditions. The rule is that each member in the class causes the same kind of behavior of the system. In other words, the "Equivalence Class Partitioning" method creates sets of inputs or outputs that are handled in the same way by the application.
Another definition taken from Wikipedia:
"A technique in black box testing. It is designed to minimize the number of test cases by dividing tests in such a way that the system is expected to act the same way for all tests of each equivalence partition. Test inputs are selected from each class. Every possible input belongs to one and only one equivalence partition."
Why learn "Equivalence Class Partitioning"?
This method drastically reduces the number of test cases that are required to be tested because we don't have time, money or manpower to test everything. In addition, it can help you find many errors with the smallest number of test cases.
How to use "Equivalence Class Partitioning"?
There are 2 major steps we need to do in order to use equivalence class partitioning:
  • Identify the equivalence classes of input or output. Take each input's or output's condition that is described in the specification and derive at least 2 classes for it:
    • One class that satisfies the condition – the valid class.
    • Second class that doesn't satisfy the condition – the invalid class.
  • Design test cases based on the equivalence classes.
Example 1
In a computer store, the computer item can have a quantity between -500 to +500. What are the equivalence classes?
Answer: Valid class: -500 <= QTY <= +500
                Invalid class: QTY > +500
                Invalid class: QTY < -500
Example 2
In a computer store, the computer item type can be P2, P3, P4, and P5 (each type influences the price). What are the equivalence classes?
Answer: Valid class: type is P2
                Valid class: type is P3
                Valid class: type is P4
                Valid class: type is P5
                Invalid class: type isn’t P2, P3, P4 or P5
Practice
Bank account can be 500 to 1000 or 0 to 499 or 2000 (the field type is integer). What are the equivalence classes?
Try to solve it before reading the answer.
Practice 1 - answer
  • Valid class: 0 <= account <= 499
  • Valid class: 500 <= account <= 1000
  • Valid class: 2000 <= account <= 2000
  • Invalid class: account < 0
  • Invalid class: 1000 < account < 2000
  • Invalid class: account > 2000
Equivalence Class Vs Boundary Testing
Let us discuss about the difference between Equivalence class and boundary testing. For the discussion we will use the practice question:
Bank account can be integer in the following ranges: 500 to 1000 or 0 to 499 or 2000. What are the equivalence classes?
Answer:
  • valid class: 0 <= account <= 499
  • valid class: 500 <= account <= 1000
  • valid class: 2000 <= account <= 2000
  • invalid class: account < 0
  • invalid class: 1000 < account < 2000
  • invalid class: account > 2000
In equivalence class, you need to take one value from each class and test whether the value causes the system to act as the class' definition. It means that in this example, you need to create at least 6 test cases – one for each valid class and one for each invalid class.
How many test cases will be, if you use boundary testing?
The following table shows how much test cases will be using "Boundary Testing" method:

Test Case #
Value
Result
1
-1
Invalid
2
0
Valid
3
1
Valid
4
498
Valid
5
499
Valid
6
500
Valid
7
501
Valid
8
999
Valid
9
1000
Valid
10
1001
Invalid
11
1999
Invalid
12
2000
Valid
13
2001
Invalid
In boundary testing, you need to test each value in the boundary and you know the value, you don't need to choose it from any set. In this example you have 13 test cases.
Now, let us exam how to combine this 2 methods together.
The following table shows all the boundary testing values and their equivalence classes:
#
Boundary Value
Equivalence Class
Result
1
-1
account < 0
Invalid 
2
0
0 <= account <= 499
Valid 
3
1
0 <= account <= 499
Valid 
4
498
0 <= account <= 499
Valid 
5
499
0 <= account <= 499
Valid 
6
500
500 <= account <= 1000
 Valid
7
501
500 <= account <= 1000
Valid 
8
999
500 <= account <= 1000
Valid 
9
1000
500 <= account <= 1000
 Valid
10
1001
1000 < account < 2000
Invalid 
11
1999
1000 < account < 2000
 Invalid
12
2000
2000 <= account <= 2000
Valid 
13
2001
account > 2000
Invalid 
Now, we can reduce some of the test cases that belong to the same equivalence class. We can delete lines 3 and 4 which belong to equivalence class "0 <= account <= 499". We also can delete lines 7 and 8 hich belong to "500 <= account <= 1000". The new table will be:
#
Boundary Value
Equivalence Class
Result
1
-1
account < 0
Invalid 
2
0
0 <= account <= 499
Valid 
5
499
0 <= account <= 499
Valid 
6
500
500 <= account <= 1000
 Valid
9
1000
500 <= account <= 1000
 Valid
10
1001
1000 < account < 2000
Invalid 
11
1999
1000 < account < 2000
 Invalid
12
2000
2000 <= account <= 2000
Valid 
13
2001
account > 2000
Invalid 
You can even reduce more test cases although in my opinion, it is important to keep this table because it keeps a hard connection to the boundary testing. You can see in the table that I didn't reduce those test cases that are touch in the boundary itself of each range.
Let's reduce more test cases (just for the fun and for the practice (test case 5, 9 and 10):
#
Boundary Value
Equivalence Class
Result
1
-1
account < 0
Invalid 
2
0
0 <= account <= 499
Valid 
6
500
500 <= account <= 1000
 Valid
11
1999
1000 < account < 2000
 Invalid
12
2000
2000 <= account <= 2000
Valid 
13
2001
account > 2000
Invalid 
Now, in this table, for each equivalence class, you choose one value that belongs to boundary testing.
A smart man once told me that when I write a test case and I using equivalence class partitioning, not to write specific values. Instead, he told me to write the classes and their expected results. By that, each time a tester will run the test case he will choose new candidates from each class. Using that working method we can promise that each running will contain new values.  

 Metrics Used In Testing

In this tutorial you will learn about metrics used in testing, The Product Quality Measures - 1. Customer satisfaction index, 2. Delivered defect quantities, 3. Responsiveness (turnaround time) to users, 4. Product volatility, 5. Defect ratios, 6. Defect removal efficiency, 7. Complexity of delivered product, 8. Test coverage, 9. Cost of defects, 10. Costs of quality activities, 11. Re-work, 12. Reliability and Metrics for Evaluating Application System Testing.

 Basic coverage criteria

There are a number of coverage criteria, the main ones being:
  • Function coverage - Has each function (or subroutine) in the program been called?
  • Statement coverage - Has each node in the program been executed?
  • Decision coverage or branch coverage - Has every edge in the program been executed? For instance, have the requirements of each branch of each control structure (such as in IF and CASE statements) been met as well as not met?
  • Condition coverage (or predicate coverage) - Has each Boolean sub-expression evaluated both to true and false? This does not necessarily imply decision coverage.
  • Condition/decision coverage - Both decision and condition coverage should be satisfied.
All Cisco routers are classfull by default. You need to configure ip classless command
Config reg 2100  rom monitor mode
Config reg 2101 tells the router boot  from rom
Configreg 2102  specifies a default boot file name and tells the router to look in NVRAM for boot sequence.
Config reg 2142 tells the router to not to load the startup-config in NVRAM to provide password recovery.

The line console 0 command is known as a major command (also known as a global command), and any command typed form the (config line) prompt is known as a subcommand.

Summarization is also called as route aggregation, allow routing protocol to advertise many
Network address as one address.

No comments:

Post a Comment