Level 0
USER
Downloads
Audio
Video
Text
Level 1
6.4)Database Design USER
Downloads
Audio
Text
Pause
Download operation
Video
Start
Resume
View
Grid
Segment
Text
CleanUp Remove
completed
Not Applicable
6.5) User Interfaces or Output Screens.
7.0 Code
public partial class MainForm : Form, ISingleInstanceEnforcer {
void downloadList1_SelectionChange(object sender, EventArgs e) {
int cnt = downloadList1.SelectedCount;
bool isSelected = cnt > 0;
bool isSelectedOnlyOne = cnt == 1;
removeToolStripMenuItem.Enabled = isSelected;
removeCompletedToolStripMenuItem.Enabled = isSelected;
toolStart.Enabled = isSelected;
private void tmrRefresh_Tick(object sender, EventArgs e) {
toolStripScheduler.Checked =
private void MainForm_Load(object sender, EventArgs e) {
private void toolNewDownload_Click(object sender, EventArgs e) {
downloadList1.NewFileDownload(null, true);
}
private void toolStart_Click(object sender, EventArgs e) {
downloadList1.StartSelections();
}
private void toolPause_Click(object sender, EventArgs e) {
downloadList1.Pause();
}
private void toolPauseAll_Click(object sender, EventArgs e) {
downloadList1.PauseAll();
}
private void toolRemove_Click(object sender, EventArgs e) {
downloadList1.RemoveSelections();
}
private void toolRemoveCompleted_Click(object sender, EventArgs e)
{
downloadList1.RemoveCompleted();
}
private void toolOptions_Click(object sender, EventArgs e) {
using (OptionsForm options = new OptionsForm()) {
options.ShowDialog();
} }
private void toolAbout_Click(object sender, EventArgs e) {
#region ISingleInstanceEnforcer Members
public void OnMessageReceived(MessageEventArgs e) {
downloadList1.AddDownloadURLs(ResourceLocation.FromURLA rray(args), 1, null, 0);
} }
public void OnNewInstanceCreated(EventArgs e) {
toolStripMain.Visible = Settings.Default.ViewToolbar;
if (toolStripMain.Visible)
gridToolStripMenuItem.Checked = Settings.Default.ViewGrid;
segmentsToolStripMenuItem.Checked = Settings.Default.ViewTransDetails;
toolbarToolStripMenuItem.Checked = Settings.Default.ViewToolbar;
}
private void exitToolStripMenuItem_Click(object sender, EventArgs e)
{
Close();
}
private void newBatchDownloadToolStripMenuItem_Click(object sender, EventArgs e)
{
downloadList1.NewBatchDownload();
}
private void viewMenuClickClick(object sender, EventArgs e) {
ToolStripMenuItem menu = ((ToolStripMenuItem)sender);
menu.Checked = !menu.Checked;
Settings.Default.ViewGrid = gridToolStripMenuItem.Checked;
Settings.Default.ViewToolbar =
private void MainForm_FormClosing(object sender, FormClosingEventArgs e)
{
Settings.Default.Save();
}
private void showHideToolStripMenuItem_Click(object sender, EventArgs e)
public void ShowForm()
private void showHideToolStripMenuItem_Click(object sender, MouseEventArgs e)
private void newVideoDownloadToolStripMenuItem_Click(object sender, EventArgs e)
{
downloadList1.NewVideoDownload();
}
private void toolStripScheduler_Click(object sender, EventArgs e)
{
downloadList1.StartScheduler(toolStripScheduler.Checked);
}
private void importFromTextFileToolStripMenuItem_Click(object sender, EventArgs e)
{
downloadList1.ImportFromTextFile();
}
private void toolStripButton2_Click(object sender, EventArgs e) {
downloadList1.MoveSelectionsUp();
}
private void toolStripButton3_Click(object sender, EventArgs e) {
downloadList1.MoveSelectionsDown();
}
private void setCustomToolStripMenuItem_Click(object sender, EventArgs e)
{
((SpeedLimitUIExtension)speedLimit.UIExtension).ShowSpeedLi mitDialog();
}
private void enableSpeedLimitToolStripMenuItem_Click(object
private void cntxMenuDownLimit_Opening(object sender, CancelEventArgs e)
{
enableSpeedLimitToolStripMenuItem.Checked = speedLimit.Parameters.Enabled;
}
private void selectAllToolStripMenuItem_Click(object sender, EventArgs e)
{
downloadList1.SelectAll();
}
private void clipboardMonitoringToolStripMenuItem_Click(object sender, EventArgs e)
{
downloadList1.ClipboardMonitorEnabled = (clipboardMonitoringToolStripMenuItem.Checked);
}
private void notifyIconContextMenu_Opening(object sender, CancelEventArgs e)
void locationMain_UrlChanged(object sender, EventArgs e) {
try {
Uri u = new Uri(locationMain.ResourceLocation.URL);
txtFilename.Text = u.Segments[u.Segments.Length - 1];
public ResourceLocation DownloadLocation {
}
private void lvwLocations_ItemSelectionChanged(object sender, ListViewItemSelectionChangedEventArgs e)
private void btnRemove_Click(object sender, EventArgs e) {
private void btnAdd_Click(object sender, EventArgs e) {
ResourceLocation rl = locationAlternate.ResourceLocation;
if (lvwLocations.SelectedItems.Count > 0)
ListViewItem item = new ListViewItem();
private void btnOK_Click(object sender, EventArgs e) {
else
private void AddDownloadsFromZip(TreeNodeCollection nodes, ResourceLocation[] mirrors)
{
private void btnCancel_Click(object sender, EventArgs e) {
Close();
}
private void chkChooseZIP_CheckedChanged(object sender, EventArgs e)
private TreeNode GetNodeFromPath(String path, out string displayName)
if (parentNode == null)
zipReaderThread = new Thread(
private void DisplayZIPOnTree(ZipRemoteFile zipFile) {
// skip folders...
/* this.tableLayoutPanel1.RowStyles.Add(new
private void NewDownloadForm_FormClosing(object sender, FormClosingEventArgs e)
{
this.ReleaseZIPThread();
} }
8.0. TESTING
Software testing is a critical element of software quality assurance and represents the ultimate review of specification, design and coding. The increasing visibility of software as a system element and attendant costs associated with a software failure are motivating factors for we planned, through testing. Testing is the process of executing a program with the intent of finding an error. The design of tests for software and other engineered products can be as challenging as the initial design of the product itself.
There of basically two types of testing approaches.
One is Black-Box testing – the specified function that a product has been designed to perform, tests can be conducted that demonstrate each function is fully operated.
The other is White-Box testing – knowing the internal workings of the product ,tests can be conducted to ensure that the internal operation of the product performs according to specifications and all internal components have been adequately exercised.
White box and Black box testing methods have been used to test this package. All the loop constructs have been tested for their boundary and intermediate conditions. The test data was designed with a view to check for all the conditions and logical decisions.
Error handling has been taken care of by the use of exception handlers.
Testing Strategies :
Testing is a set of activities that can be planned in advanced and conducted systematically. A strategy for software testing must accommodation low-level tests that are necessary to verify that a small source code segment has been correctly implemented as well as high-level tests that validate major system functions against customer requirements.
Software testing is one element of verification and validation.
Verification refers to the set of activities that ensure that software correctly implements as specific function. Validation refers to a different set of activities that ensure that the software that has been built is traceable to customer requirements.
The objective of software testing to uncover errors. To fulfill this objective, a series of test steps unit, integration, validation and system tests are planned and executed. Each test step is accomplished through a series of systematic test technique that assist in the design of test cases. With each testing step, the level of abstraction with which software is considered is broadened.
Unit Testing :
Unit testing focuses verification effort on the smallest unit of software design – the module. The unit test is always white box oriented. The tests that occur as part of unit testing are testing the module interface, examining the local data structures, testing the boundary conditions, executing all the independent paths and testing error-handling paths.
Integration Testing :
Integration testing is a systematic technique for constructing the program structure while at the same time conducting tests to uncover errors associated with interfacing. Scope of testing summarizes the specific functional, performance, and internal design characteristics that are to be tested. It employs top-down testing and bottom-up testing methods for this case.
White Box Testing:
The purpose of any security testing method is to ensure the robustness of a system in the face of malicious attacks or regular software failures. White box testing is performed based on the knowledge of how the system is implemented. White box testing includes analyzing data flow, control flow, information flow, coding practices, and exception and error handling within the system, to test the intended and unintended software behavior.
White box testing can be performed to validate whether code implementation follows intended design, to validate implemented security functionality, and to uncover exploitable vulnerabilities.
White box testing requires access to the source code. Though white box testing can be performed any time in the life cycle after the code is developed, it is a good practice to perform white box testing during the unit testing phase.
White box testing requires knowing what makes software secure or insecure, how to think like an attacker, and how to use different testing tools and techniques. The first step in white box testing is to comprehend and analyze source code, so knowing what makes software secure is a fundamental requirement. Second, to create tests that exploit software, a tester must think like an attacker. Third, to perform testing effectively, testers need to know the different tools and techniques available for white box testing. The three requirements do not work in isolation, but together.
Black Box Testing:
Also known as functional testing. A software testing technique whereby the internal workings of the item being tested are not known by the tester. For example, in a black box test on software design the tester only knows the inputs and what the expected outcomes should be and not how the program arrives at those outputs. The tester does not ever examine the programming code and does not need any further knowledge of the program other than its specifications.
The advantages of this type of testing include:
• The test is unbiased because the designer and the tester are independent of each other.
• The tester does not need knowledge of any specific programming languages.
• The test is done from the point of view of the user, not the designer.
• Test cases can be designed as soon as the specifications are complete.
System Testing :
System testing validates software once it has been incorporated into a larger system. Software is incorporated with other system elements and a series of system integration and validation tests are conducted. System testing is actually a series of different test whose primary purpose is to fully exercise the computer- based system.
Once the system has been developed it has to be tested. In the present system we have to take care of valid property and assessment numbers i.e. there should not exist any duplicate number in each case. Care should be taken that the appropriate data is retrieved in response to the queries.
VALIDATION
The terms verification and validations are used interchangeably we will describe both these methods. Verification is the process of determining
whether or not the products of given phase of software development fulfill the specifications established in the previous phase. These activities include proving and reviews.
Validation is the process of evaluating the software at the end of software development process, we find how well the software satisfies the requirement specifications.
The requirement of the software starts with requirement document and requirement specifications without errors and specifying client’s requirements correctly. The validation process of evaluating the developed system at the end is to ensure that it must satisfy all the necessary requirement specification.
Requirement verification also checks the factors as completeness, consistency and testability of the requirements.
As we all know that testing plays a crucial role in evaluation of the system. That is in order to know whether the system working properly or not. In other words we can say that in order to know whether the system which we have developed will give the expected output or not can be know by doing the testing. Testing phase comes after coding phase . Usually organizations or the software developing companies use different types of testing strategies in order to evaluate the performance of a system. Also it gives the output which provides clear information regarding the project or system , whether the project which we have developed will going to give the expected output or not , that is whether the system fails or succeed in the market.
We have many types of testing such as unit testing, integration testing, system testing, black box testing, white box testing and regression analysis testing and so on.
In our project Secure Cryptographic messaging we are using unit testing, integration testing , and system testing.
Unit testing is the one in which each entity or objects in the module will be tested . Once the entity is evaluated to be tested successfully than will move further with the another kind of testing. That’s is once unit testing is done with all modules, than integration testing will be done, on the every module or on group of two or three modules. Finally system testing will be done , in which all the modules of a system will be tested at once , there by getting the overall performance of a system that means we can conclude the
result on the entire system whether our system is working as per our requirements or as per our expectations or not. The advantage of developing or testing modules wise is that , we can reduce the effort, cost and time. Because if we are testing module wise than we can know clearly which module is working fine and which module is not working , thereby the module which is not working perfectly can be evaluated once again by going necessary modifications unlike the system being tested on a whole , where if any errors comes in than the entire system need to be tested or evaluated which consumes more effort , time and cost.