Sie sind auf Seite 1von 4

Testing MySQL Clustering

Testing
Overview –
The entire project can be divided into three primary phases -

1. The Database layer


2. The Web-Service layer
3. The Front-End GUIs

On the basis of this distribution, the overall testing plan can be categorized into two
stages –

1. Scalability Testing
2. Client side GUI testing – this includes the testing of the Web Services layer

Test environment –
The entire process of testing was done in a virtual environment consisting of four
systems connected in a network. The virtual environment was implemented using
VirtualBox.

The configuration of the host machine is as follows –

Processor – Intel® Core™ 2 Quad CPU – Q6660 @ 2.40 GHz


Memory (RAM) – 4.00 GB
Hard-Disk – 320 GB
Operating System – Windows Vista
System Type – 32 bit Operating System

The configuration of the guest virtual machines are as follows –

1. Processor – Intel® Core™ 2 Quad CPU – Q6660 @ 2.40 GHz


Memory (RAM) – 512 MB
Hard-Disk – 25 GB (Dynamically expanding storage)
Operating System – Windows Vista

2. Processor – Intel® Core™ 2 Quad CPU – Q6660 @ 2.40 GHz


Memory (RAM) – 256 MB
Testing MySQL Clustering

Hard-Disk – 25 GB (Dynamically expanding storage)


Operating System – Windows 2003

3. Processor – Intel® Core™ 2 Quad CPU – Q6660 @ 2.40 GHz


Memory (RAM) – 256 MB
Hard-Disk – 25 GB (Dynamically expanding storage)
Operating System – Fedora 10

4. Processor – Intel® Core™ 2 Quad CPU – Q6660 @ 2.40 GHz


Memory (RAM) – 640 MB
Hard-Disk – 25 GB (Dynamically expanding storage)
Operating System – OpenSolaris 2008.11

Note – All the virtual machines use the same hard-disk and the same processor with a
part of the RAM dedicated to each one of them.

Scalability Testing –
Scalability testing is performed at the database right after the configuration of
Asynchronous/Synchronous replication model.

Scalability testing helps in testing –

• The working of the Asynchronous/Synchronous replication model.


• The load that can be taken by the MySQL databases in the network.

Scalability testing can be performed by running SQL scripts from the MySQL client
console. The SQL scripts were generated from a Java program using a randomizer (Java
code and SQL scripts included).

Features of the SQL scripts –

• An initial create script is provided to create the database and the tables.
• Insertion of records takes places in steps, starting from 10 reaching to 10000. At
every step the entire table is wiped out and new records are inserted. Insertion is
done using the insert scripts.
• A certain portion of the records are updated. If the randomizer in the Java
program provides a uniform distribution, about 50% of records will be updated.
Update is done using the update scripts.
Testing MySQL Clustering

• A query script displays all the records present in the table – which is equal to the
number of records inserted.
• A certain portion of the records are deleted. If the randomizer in the Java
program provides a uniform distribution, about 50% of records will be deleted.
Deletion is done using the delete scripts.
• The entire contents of the table are wiped out using a delete_all script.
• The database and the table can be completely removed using the purge script.
• The results of scalability testing are documented at “05 Testing - Scalability
Testing”.

Observation – Asynchronous operations are comparatively faster to Synchronous


operations.

Client Side GUI Testing (Asynchronous) –


The client GUI is tested considering various test scenarios. The primary test mechanism
followed is black-box testing.

The client side GUI is connected to the database using a web-service layer. So these test
scenarios test the GUI as well as the web-service layer.

The 8 operations (JDBC Insert, JDBC Update, JDBC Delete, JDBC Query, Hibernate Insert,
Hibernate Update, Hibernate Delete and Hibernate Query) are tested in each of the 4
GUIs (Java Swing, Java Server Faces, Java Micro Edition and ASP.net).

The various test scenarios and the expected results considered are

• All the record parameters are entered properly – the operation succeeds.
• Slave goes down – the database down indicates a backup failure. In the case of
JDBC Query and Hibernate Query, all the databases show a backup failure
indicating data inconsistency.
• Master goes down – the operation fails.
• Duplicate primary key – only in the case of JDBC Insert and Hibernate Insert. The
operation fails.
• Required data isn’t entered properly – only in the case of JDBC Insert and
Hibernate Insert. Message indicating the required fields, is displayed.
Testing MySQL Clustering

The total number of test cases for Asynchronous Replication model is – 112 test cases.

The results of Client Side GUI testing (Asynchronous) are documented at “05 Testing -
Asynchronous”.

Client Side GUI Testing (Synchronous) –


The client GUI is tested considering various test scenarios. The primary test mechanism
followed is black-box testing.

The client side GUI is connected to the database using a web-service layer. So these test
scenarios test the GUI as well as the web-service layer.

The 8 operations (JDBC Insert, JDBC Update, JDBC Delete, JDBC Query, Hibernate Insert,
Hibernate Update, Hibernate Delete and Hibernate Query) are tested in each of the 4
GUIs (Java Swing, Java Server Faces, Java Micro Edition and ASP.net).

The various test scenarios and the expected results considered are

• All the record parameters are entered properly – the operation succeeds.
• Slave goes down – the database down indicates a backup failure. In the case of
JDBC Query and Hibernate Query, all the databases show a backup failure
indicating data inconsistency.
• Data Node 1 goes down – the operation succeeds. Data node 2 takes up the
requests, thereby saving the setup from collapsing.
• Data Node 1 and 2 goes down – the operation fails. There is no way for the
applications to get data.
• Master goes down – the operation fails.
• Duplicate primary key – only in the case of JDBC Insert and Hibernate Insert. The
operation fails.
• Required data isn’t entered properly – only in the case of JDBC Insert and
Hibernate Insert. Message indicating the required fields, is displayed.

The total number of test case for Synchronous Replication model is – 176 test cases.

The results of Client Side GUI testing (Asynchronous) are documented at “05 Testing -
Synchronous”.

Das könnte Ihnen auch gefallen