All Downloads are FREE. Search and download functionalities are using the official Maven repository.

bichromate.DBAccess.sTestSMSConnection Maven / Gradle / Ivy

Go to download

Java, Selenium, Appium, Winium, Extend, and TestNG automated testing framework. Bichromate integrates the best of these frameworks and takes automation to the next level. With Bichromate there is one function call that builds any type of Web,IOS Mobile, Android, and Windows App driver on any platform (Windows, Mac, Linux). From Local web drivers, to SauceLabs, Browserstack, and Selenium grid. Build data driven tests is never easier. Bichromate also gives you built in Factories that, access DBs, Video Capture, FTP, POM Generation, Hilite element.

There is a newer version: 3.13
Show newest version
package bichromate.DBAccess;



import java.sql.ResultSet;
import java.sql.Statement;
import java.util.ResourceBundle;
import java.sql.Connection;
//import java.sql.DriverManager;
//import java.sql.ResultSet;
import java.sql.SQLException;
//import java.sql.Statement;
//import java.util.Locale;
//import java.util.MissingResourceException;
//import java.util.ResourceBundle;
import com.mysql.cj.jdbc.MysqlDataSource;

public class sTestSMSConnection {
	
	private static ResourceBundle resources;
	
	public sTestSMSConnection(ResourceBundle myResources){
		
		setupParameters(myResources);
			
	 
	}// sTestMySQLConnector
	public sTestSMSConnection(){
	
		setupParameters(resources);
			
	 
	}// sTestMySQLConnector

	private void setupParameters(ResourceBundle resources){
		MysqlDataSource dataSource = new MysqlDataSource();
		dataSource.setUser("scott");
		dataSource.setPassword("tiger");
		dataSource.setServerName("myDBHost.example.org");

		Connection conn;
		try {
			conn = dataSource.getConnection();
			Statement stmt = conn.createStatement();
			ResultSet rs = stmt.executeQuery("SELECT ID FROM USERS");

			rs.close();
			stmt.close();
			conn.close();
		} catch (SQLException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		
	}
	 //
	// Inner class for testing on the command line
	//
	public static class Test
	{
		public static void main(final String[] args)
    	{
			
			
    	}//main
	}// Test
}// sTestSMSConnection




© 2015 - 2024 Weber Informatics LLC | Privacy Policy