Testing servers.

Slides:



Advertisements
Similar presentations
Continuation of chapter 6…. Nested while loop A while loop used within another while loop is called nested while loop. Q. An illustration to generate.
Advertisements

How to use TinyOS Jason Hill Rob Szewczyk Alec Woo David Culler An event based execution environment for Networked Sensors.
For(int i = 1; i
Comm Operator Tutorial How to send sequence data at given time automatically Serial Port Tool
Socket Programming ENTERPRISE JAVA. 2 Content  Sockets  Streams  Threads  Readings.
1 CSC241: Object Oriented Programming Lecture No 21.
Multiplexing/Demux. CPSC Transport Layer 3-2 Multiplexing/demultiplexing application transport network link physical P1 application transport network.
Building Secure Distributed Systems The CIF model : Component Information Flow Lilia Sfaxi DCS Days - 26/03/2009.
SYNC YOUR S3 SCANNER. To sync your Scanner means: Sending the data of the scans you made from your Scanner to the worldwide Nu Skin server. Benefits:
UPLOAD YOUR S2 SCANNER. To upload your Scanner means: Sending the data of the scans you made from your Scanner to the worldwide Nu Skin server. Benefits:
Internet Security Protocols
Thread Examples. Runnable Interface Runnable defines only one abstract method; Public void run(); Thread also implements Runnable interface. Why does.
Unit testing C# classes “If it isn’t tested it doesn’t work” Unit testing C# classes1.
1 First app – simplechat1 Reminder: what’s the point?  To build on ocsf framework.  Simple requirements: echo all messages to all clients.  Use only.
Inline Function. 2 Expanded in a line when it is invoked Ie compiler replace the function call with function code To make a function inline the function.
Web Integration to an Appx Backend Server. Unix web servers + CGI Win2K web servers + ASP Win2K web servers + ODBC Processing requests Generating HTML.
HOW TO PULL YOUR VOICE MAILS INTO YOUR CLIENT Primary advantage: You will have a permanent.wav file on your PC and you choose when to delete it.
NetSync: script-based acquistion managed in a network environment NetSync was devised to solve a simple problem: how to manage an experiment with two or.
DYNAMIC HOST CONFIGURATION PROTOCOL (DHCP) BY: SAMHITA KAW IS 373.
Comm Operator Tutorial How to send the data after receiving specific data automatically Serial Port Tool
First, open Microsoft Outlook How To Configure Microsoft Outllook For Your Webspace Account.
1 Chapter Client-Server Interaction. 2 Functionality  Transport layer and layers below  Basic communication  Reliability  Application layer.
1 EIE424 Distributed Systems and Networking Programming –Part II 2. XML-RPC.
Designing For Testability. Incorporate design features that facilitate testing Include features to: –Support test automation at all levels (unit, integration,
Comm Operator Tutorial How to send the same data at fixed interval time automatically Serial Port Tool
Automatic Software Testing Tool for Computer Networks ADD Presentation Dudi Patimer Adi Shachar Yaniv Cohen
DHCP Security DHCP Snooping and Security David Mitchell 03/19/2008.
REVIEW On Friday we explored Client-Server Applications with Sockets. Servers must create a ServerSocket object on a specific Port #. They then can wait.
Internet Applications and Network Programming Dr. Abraham Professor UTPA.
KEOPS.Pack&Ship Desktop June, KEOPS KEOPS.Pack&Ship Desktop is a software toolkit you can integrate into your Warehouse Management System to :
SOFTWARE PROJECT MGT. TUTORIAL # 1 – LAB MANUAL AMAN QUADRI
MS Visual Studio 2005 Unit Test. Agenda Team system 概觀 Unit Test Code Coverage Web Test.
1 (Worker Queues) cs What is a Thread Pool? A collection of threads that are created once (e.g. when a server starts) That is, no need to create.
Laboratory - 4.  Threading Concept  Threading in.NET  Multi-Threaded Socket  Example.
Oracle Data Integrator Agents. 8-2 Understanding Agents.
Li Tak Sing COMPS311F. RMI callbacks In previous example, only the client can initiate a communication with the server. The server can only response to.
Java Remote Method Invocation (RMI) Overview of RMI Java RMI allowed programmer to execute remote function class using the same semantics as local functions.
1 Client-Server Interaction. 2 Functionality Transport layer and layers below –Basic communication –Reliability Application layer –Abstractions Files.
Static. 2 Objectives Introduce static keyword –examine syntax –describe common uses.
LQCD Workflow Project L. Piccoli October 02, 2006.
Test Automation For Web-Based Applications Portnov Computer School Presenter: Ellie Skobel.
3:00. 2:59 2:58 2:57 2:56 2:55 2:54 2:53 2:52.
Network Programming: Servers. Agenda l Steps for creating a server Create a ServerSocket object Create a Socket object from ServerSocket Create an input.
Concurrent TCP servers. The basic idea 1 client = 1 task. The task is alive as long until the connection is closed The task closes the connection.
EnvisioningPlanningDevelopingStabilizingDeploying.
Bret Stateham Owner, Net Connex blogs.netconnex.com
Backup and Restore on the ALSMS Server Configuration Example Alcatel-Lucent Security Products Configuration Example Series.
Introduction to Omnet++ By: Mahsa Soheil Shamaee.
IPitomy SIP Trunks 101 Programing and activating SIP Trunks with IPitomy’s assisted turn-up.
Static Variables. Function Scope  “Normal” local variables go out of scope and are deallocated when a function terminates.
Unit 7: DHCP, APIPA and NTP. Static versus dynamic IP addressing Dynamic IP addresses can change each time you connect to the Internet, while static IP.
Changing the IP Address on the ALSMS Server Configuration Example
Threads in Java Two ways to start a thread
Thread Pools (Worker Queues) cs
Thread Pools (Worker Queues) cs
Introducing To Networking
Software project mgt. Tutorial # 1 – lab manual.
Lab 7 Instructions You can use g++ on build server, visual studio on local machine or your preferred C++ IDE. Important Note: For your grade, please show.
Unit testing C# classes
Top Fire Protection Services Ottawa available on Dubinskyconstruction
Method Mark and Lyubo.
CNT 4007C Project 2 Good morning, everyone. In this class, we will have a brief look at the project 2. Project 2 is basically the same with project 1.
Java Lesson 36 Mr. Kalmes.
class PrintOnetoTen { public static void main(String args[]) {
Lecture 14: Inheritance Building Java Programs: A Back to Basics Approach by Stuart Reges and Marty Stepp Copyright (c) Pearson All rights reserved.
New Beginnings – examples
Test Process “V” Diagram
Building Java Programs
New Beginnings – examples
Computer Science 3 03A-Searching
Presentation transcript:

Testing servers

Testing a server: The idea Start the server (manually) [TestMethod] Send a request to the server Read the response from the server Compare the response to your expectations Assert.AreEqual(expected, response) Stop the server (manually) Example: EchoTcpServer Note: Although we use a Unit test tool this is not unit testing. It is integration testing

Start and stop the server automatically The test should be able to start and later stop the server automatically The server should have methods Start() and Stop() [ClassInitialize] executed once - before the first [TestMethod] [ClassCleanup] Executed once - after the last [TestMethod] Example: EchoTcpServer

Start and stop the server from the test private const int Port = 14593; private static EchoServer _server; [ClassInitialize] public static void TestStart(TestContext context) { _server = new EchoServer(Port); Task.Run(() => _server.Start()); } [ClassCleanup] public static void TestStop() { _server.Stop(); }

The servers Stop() method Server refuses new connections Existing connections (Tasks) must be given a chance to finish Example: EchoTcpServer