Remote Unit Testing Milestone III Alex Riordan Brian Pruitt-Goddard.

Slides:



Advertisements
Similar presentations
Categories of I/O Devices
Advertisements

A batch file is a file that contains a number of DOS commands, each of which could be run individually from the command prompt. By putting them into a.
Operating-System Structures
CSE 4939 Alex Riordan Brian Pruitt-Goddard Remote Unit Testing.
1 Chapter 12 Working With Access 2000 on the Internet.
Remote Unit Testing Brian Pruitt-Goddard Alex Riordan.
Remote Method Invocation Chin-Chih Chang. Java Remote Object Invocation In Java, the object is serialized before being passed as a parameter to an RMI.
Introduction to Java Programming, 4E
Fall 2007CS 2251 Programming Tools Eclipse JUnit Testing make and ant.
WHAT IS AJAX? Zack Sheppard [zts2101] WHIM April 19, 2011.
Milestone IV Brian Pruitt-Goddard Alex Riordan. Create, edit, open, execute small source files from your android phone against a remote server. Test Success!
1 Chapter Overview Introduction to Windows XP Professional Printing Setting Up Network Printers Connecting to Network Printers Configuring Network Printers.
Chapter 6: Hostile Code Guide to Computer Network Security.
1 Guide to JSP common functions 1.Including the libraries as per a Java class, e.g. not having to refer to java.util.Date 2.Accessing & using external.
Welcome To. Improving Remote File Transfer Speeds By The Solution For: %
Form Handling, Validation and Functions. Form Handling Forms are a graphical user interfaces (GUIs) that enables the interaction between users and servers.
BASIC JAVA PROGRAMMING TUTORIAL. History  James Gosling and Sun Microsystems  Oak  Java, May 20, 1995, Sun World  Hot Java –The first Java-enabled.
6/1/2001 Supplementing Aleph Reports Using The Crystal Reports Web Component Server Presented by Bob Gerrity Head.
M. Taimoor Khan * Java Server Pages (JSP) is a server-side programming technology that enables the creation of dynamic,
Advanced Shell Programming. 2 Objectives Use techniques to ensure a script is employing the correct shell Set the default shell Configure Bash login and.
FALL 2005CSI 4118 – UNIVERSITY OF OTTAWA1 Part 4 Web technologies: HTTP, CGI, PHP,Java applets)
LAYING OUT THE FOUNDATIONS. OUTLINE Analyze the project from a technical point of view Analyze and choose the architecture for your application Decide.
System Calls 1.
DMT File Management Common Problems Managing DMT files –Reliable Upload –Reliable Download –Where are the files kept? –Tedious Procedures Using DOS commands.
CS 4720 Enterprise Architecture CS 4720 – Web & Mobile Systems.
Understanding the CORBA Model. What is CORBA?  The Common Object Request Broker Architecture (CORBA) allows distributed applications to interoperate.
1999 Cabletron Systems. Wireless Networking RoamAbout RoamAbout Installation Installation/Configuration of: Network adapter card on a: Windows 95 system.
5 Chapter Five Web Servers. 5 Chapter Objectives Learn about the Microsoft Personal Web Server Software Learn how to improve Web site performance Learn.
London April 2005 London April 2005 Creating Eyeblaster Ads The Rich Media Platform The Rich Media Platform Eyeblaster.
Integrating with UCSF’s Shibboleth system
Guidelines for Homework 6. Getting Started Homework 6 requires that you complete Homework 5. –All of HW5 must run on the GridFarm. –HW6 may run elsewhere.
Contact Information Office: 225 Neville Hall Office Hours: Monday and Wednesday 12:00-1:00 and by appointment.
Chapter 2: Operating-System Structures. 2.2 Silberschatz, Galvin and Gagne ©2005 Operating System Concepts Chapter 2: Operating-System Structures Operating.
20-753: Fundamentals of Web Programming 1 Lecture 1: Introduction Fundamentals of Web Programming Lecture 1: Introduction.
Universiti Utara Malaysia Chapter 3 Introduction to ASP.NET 3.5.
Suite zTPFGI Facilities. Suite Focus Three of zTPFGI’s facilities:  zAutomation  zTREX  Logger.
Chapter 3 Servlet Basics. 1.Recall the Servlet Role 2.Basic Servlet Structure 3.A simple servlet that generates plain text 4.A servlet that generates.
6 th Annual Focus Users’ Conference Manage Integrations Presented by: Mike Morris.
Day 14 Introduction to Networking. Unix Networking Unix is very frequently used as a server. –Server is a machine which “serves” some function Web Server.
1 CSC204 – Programming I Lecture 2 Intro to OOP with Java.
POS 406 Java Technology And Beginning Java Code
Introduction to Java Programming with Forte Y. Daniel Liang.
LAB 1CSIS04021 Briefing on Assignment One & RMI Programming February 13, 2007.
IT 456 Seminar 5 Dr Jeffrey A Robinson. Overview of Course Week 1 – Introduction Week 2 – Installation of SQL and management Tools Week 3 - Creating and.
Silberschatz, Galvin and Gagne  Operating System Concepts Chapter 3: Operating-System Structures System Components Operating System Services.
Suite zTPFGI Facilities. Suite Focus Three of zTPFGI’s facilities:  zAutomation  zTREX  Logger.
CE Operating Systems Lecture 3 Overview of OS functions and structure.
© Janice Regan, CMPT 300, May CMPT 300 Introduction to Operating Systems Memory: Relocation.
Integrating and Troubleshooting Citrix Access Gateway.
What is a port The Ports Collection is essentially a set of Makefiles, patches, and description files placed in /usr/ports. The port includes instructions.
ASP.NET in Definition: 1.ASP.NET is a web application framework developed and marketed by Microsoft to allow programmers to build dynamic web sites,
David Lawrence 7/8/091Intro. to PHP -- David Lawrence.
1 Java Servlets l Servlets : programs that run within the context of a server, analogous to applets that run within the context of a browser. l Used to.
Page 1 Printing & Terminal Services Lecture 8 Hassan Shuja 11/16/2004.
ASP-2-1 SERVER AND CLIENT SIDE SCRITPING Colorado Technical University IT420 Tim Peterson.
Selenium server By, Kartikeya Rastogi Mayur Sapre Mosheca. R
Introduction Contain two or more CPU share common memory and peripherals. Provide greater system throughput. Multiple processor executing simultaneous.
CSE 4939 Alex Riordan Brian Pruitt-Goddard. Design an interactive source control application that works between an android phone and a project located.
1 CSC160 Chapter 1: Introduction to JavaScript Chapter 2: Placing JavaScript in an HTML File.
An operating system (OS) is a collection of system programs that together control the operation of a computer system.
Chapter 4: server services. The Complete Guide to Linux System Administration2 Objectives Configure network interfaces using command- line and graphical.
IST 210: PHP Basics IST 210: Organization of Data IST2101.
Data Virtualization Demoette… Logging in CIS
Java on the LEGO Mindstorms EV3
Chapter 2: System Structures
CH5 TCP Client - Server Example:
Introduction to Computers
Course: Module: Lesson # & Name Instructional Material 1 of 32 Lesson Delivery Mode: Lesson Duration: Document Name: 1. Professional Diploma in ERP Systems.
Introduction to AppInventor
Presentation transcript:

Remote Unit Testing Milestone III Alex Riordan Brian Pruitt-Goddard

Brief Recap Develop an application with the capability to create, edit, open, compile, and execute small source files through an interface on the Android phone, with a particular focus on remote unit testing. Application requires you to install: o Server application for the execution, compilation, and physical management of files. o Client application for the creation, editing, downloading, and uploading of files.

Final Requirements: Client I/O Capabilities o Open an existing file on either the server, or from another external source such as an SD card. o Saving a file either to the server or to another external storage device. o Creating a new file. o Editing a text file.

Final Requirements: Client Issuing Commands to the Server o Save this file to the server. o Delete this file from the server. o Upload this file to me. o Compile this file. o Execute [run a unit test] this file. o Change this server configuration option.

Testing Strategy: Client “On the fly” testing o Lower-level I/O functionalities are tested “on-the-fly.” o Ensure that data sent to the server is not corrupted; furthermore, that the server receives the data as expected. Long-term testing o Ensure that all the components “fit” together and return desired results. o Since Brian is developing the client-side, Alex will test aspects not solely dependent on the server-side.

Final Requirements: Server I/O Capabilities o Physically saving/removing files to hard disk, as requested. o Delivering existing files to the client, as requested. Just following orders... o Compile a file with appropriate options. Log all results. Return relevant results to client. o Execute a file with appropriate options. Log all results. Return relevant results to client. o Reading and understanding a configuration file.

Testing Strategy: Server “On-the-fly testing” o Ensure that server can compile any valid Java source file (.class files) o Ensure that any valid unit test will be run and return a result. Long-term testing o Since Alex is writing the server-side, Brian will test the server-side by blinding feeding it multiple.class files to compile and to run unit tests against and comparing not only the results, but if the requested results and no less were returned.

General Requirements Performance: o “Don't leave me hanging, man”: Remotely executing a file and waiting on output always leaves the possibility of an infinitely looping program. We can't decide the halting problem, but we can decide that a program running 100 times longer than its expected run time probably isn't working and should be terminated. o Responsiveness: Any text editor should be responsive! Security: o You should not just be able to let just any IP tell the server what to do. It needs credentials.

The Devil is in the details... How the heck are we doing any of this?? o Remote procedure calls: XML-RPC o Compilation: javac [Java compiler] o Unit testing: Junit o File I/O: Java standard library Ok, so how do those work?

Compiling We make the assumption that (a) Java is installed and (b) the Java compiler (javac) exists. The compile process o Client sends a request to the server: Compile this file with these settings and return to me these results. XML-RPC packages this all up and sends this package of data the server's way. o Server opens up this package and follows the instructions – it puts together the necessary arguments and commands before making a call to the java compiler to do the actual compiling.

Compiling Cont. Wait, what? Process p = Runtime.getRuntime().exec(cmdarray, envparray); o Basically, based upon the information sent to us by the server, we build the variables cmdarray and envparray (Commands and Environment variables arrays) and then spawn a new process (the java compiler specifically) which will behave differently depending on what's in the cmdarray and envparray.

How to Run a Unit Test If you plan on compiling unit test source files, then some Junit library needs to be available. That is the most basic assumption. The unit testing process o Junit provides its library for programmatic use. No need to make external calls to compilers for this. o Call the static method UnitTester.test(List_of_Classes, Formatting_Options) o Get results.

Unit Testing Cont. So, what happens when I call UnitTester.test()? o Well, first you need to pass it a valid Class object, an Object in Java which describes a class. But if you just received the class file from over the server, how could the Java VM possibly have loaded that class file? Simple solution: use dynamic class-loading. Implementation-wise, we have chosen to use a URLClassLoader to make sure a valid Class object(s) is passed to the UnitTester.test() method. o Next, call JunitCore.run(List_of_Classes) which will return a Result object. o Using the Formatting_Options variable, determine which parts of the Result object you want and how you want to format them.

What's done, what needs to be done What's done, at least partially o Running a unit test remotely o Formatting unit test output o Data serialization: partial o Text editor: partial o File chooser What needs to be done o Compiling a file remotely o File I/O at server, client-side o Parsing the configuration file o Error handling