Advanced Web Automation Using Selenium

Slides:



Advertisements
Similar presentations
Copyright  Oracle Corporation, All rights reserved. 2 Java and Databases: An Overview.
Advertisements

Basic JDBC Celsina Bignoli What is JDBC Industry standard for database- connectivity between the Java language and a wide range of.
Distributed Application Development B. Ramamurthy.
JDBC Dr Jim Briggs. WEBP JDBC2 JDBC Java Database Connectivity An API for connecting Java programs (applications, applets and servlets) to databases Largely.
JDBC Overview Autumn 2001 Lecturer: C. DeJong. Relational Databases widespread use used via SQL (Structured Query Language) freely available powerful.
1 C. Shahabi Application Programming for Relational Databases Cyrus Shahabi Computer Science Department University of Southern California
1 Lecture 29 More on JDBC Overview  Objectives of this lecture  JDBC and its Drivers  Connecting to Databases (Java’s Connection class)  Querying a.
Java database Programming JDBC Trademarked name of a Java API that supports Java programs that access relational databases Stand for Java DataBase Connectivity.
1 Foundations of Software Design Lecture 27: Java Database Programming Marti Hearst Fall 2002.
Murali Mani Web Interface. Murali Mani Options PHP with mySQL JSP/Servlets with JDBC on mySQL/Oracle Others …
Advance Computer Programming Java Database Connectivity (JDBC) – In order to connect a Java application to a database, you need to use a JDBC driver. –
Getting connected.  Java application calls the JDBC library.  JDBC loads a driver which talks to the database.  We can change database engines without.
1 CSC 440 Database Management Systems JDBC This presentation uses slides and lecture notes available from
Think Possibility Integrating Web Applications With Databases.
© Wang Bin 2004 JDBC ----Java Database Connectivity.
Beginning Databases with JDBC Mike Bradley Adapted from and notes by Kevin Parker, Ph.D.
JDBC and Hibernate Joshua Scotton. Connecting to Relational DBs.
MySQL, Java, and JDBC CSE 3330 Southern Methodist University.
JDBC Tutorial MIE456 - Information Systems Infrastructure II Vinod Muthusamy November 4, 2004.
JDBC (Java Database Connectivity) SNU OOPSLA Lab. October 2005.
JAVA Database Access. JDBC The Java Database Connectivity (JDBC) API is the industry standard for database- independent connectivity between the Java.
Designing and Developing WS B. Ramamurthy. Plans We will examine the resources available for development of JAX-WS based web services. We need an IDE,
JDBC. JDBC stands for Java Data Base Connectivity. JDBC is different from ODBC in that – JDBC is written in Java (hence is platform independent, object.
JDBC Java and Databases. RHS – SOC 2 JDBC JDBC – Java DataBase Connectivity An API (i.e. a set of classes and methods), for working with databases in.
Accessing Database using JDBC. JDBC Objectives Gain basic knowledge of Java JDBC Become familiar with the basics of interacting with a database using.
WEB/DB1 DATABASE PROGRAMMING 3JDBC by the ASU Scholars.
Computer Science [3] Java Programming II - Laboratory Course Lab 9: Accessing Databases with JDBC Instructions on Setting Accesses Connecting to and Querying.
JDBC Database Programming in Java Prepared by., Mrs.S.Amudha AP/SWE.
JDBC. Java.sql.package The java.sql package contains various interfaces and classes used by the JDBC API. This collection of interfaces and classes enable.
12/6/2015B.Ramamurthy1 Java Database Connectivity B.Ramamurthy.
COMP 321 Week 4. Overview Normalization Entity-Relationship Diagrams SQL JDBC/JDBC Drivers hsqldb Lab 4-1 Introduction.
UNIT III - JDBC JDBC Overview – JDBC implementation – Connection class – Statements - Catching Database Results, handling database Queries. Networking–
DATABASE CONNECTIVITY TO MYSQL. Introduction =>A real life application needs to manipulate data stored in a Database. =>A database is a collection of.
Java JDBC API. A Java API To Access almost any kind of tabular data To Access almost any kind of tabular data Trademarked (not an acronym) Trademarked.
Database Access Using JDBC BCIS 3680 Enterprise Programming.
Tasks Needed for MissionMapEditor Martin Q. Zhao September 18, 2010.
CSI 3125, Preliminaries, page 1 JDBC. CSI 3125, Preliminaries, page 2 JDBC JDBC stands for Java Database Connectivity, which is a standard Java API (application.
Access Databases from Java Programs via JDBC Tessema M. Mengistu Department of Computer Science Southern Illinois University Carbondale
Basics of JDBC.
Basics of JDBC Session 14.
JDBC (Java Database Connectivity)
Advanced Java Session 5 New York University School of Continuing and Professional Studies.
Database Programming With Java & JDBC Reading: DD Ch. 18, pp al/jdbc/index.html, or anything covering JDBC.
Introduction to JDBC Instructor: Mohamed Eltabakh 1.
JDBC Java and Databases. SWC – JDBC JDBC – Java DataBase Connectivity An API (i.e. a set of classes and methods), for working with databases in.
Test Automation For Web-Based Applications Portnov Computer School Presenter: Ellie Skobel.
In the Name Of Almighty Allah. Java Application Connection To Mysql Created by Hasibullah (Sahibzada) Kabul Computer Science Faculty Afghanistan.
Intro to JDBC Joseph Sant Applied Computing and Engineering Sciences Sheridan ITAL.
SQL pepper. Why SQL File I/O is a great deal of code Optimal file organization and indexing is critical and a great deal of code and theory implementation.
CSC 411/511: DBMS Design Dr. Nan WangCSC411_L12_Oracle10g_JDBC 1 Application Development (JDBC)
Java and database. 3 Relational Databases A relational Database consists of a set of simple rectangular tables or relations The column headings are.
CS320 Web and Internet Programming Database Access with JDBC Chengyu Sun California State University, Los Angeles.
Instructor: Jinze Liu Fall /8/2016Jinze University of Kentucky 2 Database Project Database Architecture Database programming.
JSP and DB.
JDBC and OCCI 10/29/2017.
Database: JDBC Overview
DEPTT. OF COMP. SC & APPLICATIONS
CS3220 Web and Internet Programming Database Access with JDBC
Lec - 14.
JDBC Database Management Database connectivity
CS320 Web and Internet Programming Database Access with JDBC
Database JDBC Overview CS Programming Languages for Web Applications
Selenium HP Web Test Tool Training
Client Access, Queries, Stored Procedures, JDBC
JDBC – ODBC DRIVERS.
MSIS 655 Advanced Business Applications Programming
Java Database Connectivity
JDBC Example.
CS3220 Web and Internet Programming Database Access with JDBC
CS3220 Web and Internet Programming Database Access with JDBC
Presentation transcript:

Advanced Web Automation Using Selenium Portnov Computer School Advanced Web Automation Using Selenium Test Automation For Web-Based Applications Presenter: Ellie Skobel

JDBC Data Driven Testing Day 2 JDBC Data Driven Testing

Data Driven Testing Testing of application by means of re-usable test logic to reduce maintenance and improve test coverage Test scripts are executed and verified based on the data values stored in one or more central data sources

JDBC API The industry standard for database- independent connectivity between the Java programming language and a wide range of databases. Lets you: Establish a connection with a database Send SQL statements Process the results

Background Created by SUN in partnership with an array of companies Rapidly established as the industry-standard, open interface for Java applications to access databases. Supported by mySQL, Oracle, Sybase, HP, IBM, etc. http://dev.mysql.com/downloads/connector/j/

Advantages of JDBC Zero Configuration for Network Computers No configuration is required on the client side. All the information needed to make a connection is completely defined by the JDBC URL or by a DataSource object No Installation A pure JDBC technology-based driver does not require special installation; As simple as adding a jar.

Using JDBC Before we begin we will need to import the content from java.sql package. Create a Connection with the DB server Create a SQL Statement to retrieve the data Collect the ResultSet Process the Result into a Collection

Create Database Connection Information you will need: URL = jdbc:mysql://p3plcpnl0912.prod.phx3.secureserver .net:3306/ Database name = seleniumminutes Driver = com.mysql.jdbc.Driver Username = student Password = Student2015 Add the following code to Environment.java Class.forName(driver).newInstance(); Connection conn = DriverManager.getConnection(url + dbName, userName, password);

Create a SQL Statement & Collect the ResultSet Let’s create a SQL statement using form: SELECT * FROM TABLE String query = “Select * From Calculator_Data”; Now we are ready to create a statement: Statement stmt = conn.createStatement(); Collect the ResultSet: ResultSet rs = stmt.executeQuery(selectString);

Process the Result To process each row in the ResultSet, we use the next() method. This method moves the pointer through the rows of data. The ResultSet maintains a cursor pointing to the current row. Because this cursor is initially positioned before the first row, we must call next() before we can see any rows at all. while (rs.next()) { int num1 = rs.getInt("num1"); … Object[] singleTest = {num1, oper, num2, exp_result}; data.add(singleTest); }

What comes up, must come down! Cleanup What comes up, must come down! Before we are done, we must close all open threads. Close all threads in the reverse order of which they were opened. Close the statement: Statement stmt.close(); Close the connection Environment.closeMySQLConnection();