Git Product home page Git Product logo

java_test's Introduction

Java_Test

基于java语言实现登陆功能回归测试自动化测试框架

1.将测试登陆的账号密码存放在mysql数据中,实现数据脚本分离

testId username password
1 16604688441 111111
2 16604688441
3 16604688441 !
4 16604688441 !@#$!@#@#$@#$%#@!
5 16604688441 a
6 16604688441 A
7 16604688441 AsDVDweras
8 16604688441 ASDds132#$#
9 16604688441

2.项目文件结构

1.base/common 封装基本公共方法,如driver获取类,左滑右划,双指缩放等方法
2.util 封装读取数据库方法,testcase封装测试用例,business封装业务逻辑

3.数据库读取类代码

public class ExcuteDao {
    Connection conn = null;
    Statement stmt = null;
    ResultSet rs = null;
    String sql;
    String username;
    String password;

    public void QueryByID(int testId) throws Exception {
        conn = MysqlConnect.getConnection();
        stmt = (Statement) conn.createStatement();
        sql = "select * from testdata where testid = '"+testId+"'";
        rs = stmt.executeQuery(sql);
        while (rs.next()){
            username = rs.getString("username");
            password = rs.getString("password");
        }

    }
    public String getUsername(){
        return username;
    }
    public String getPassword(){
        return password;
    }
}

java_test's People

Contributors

zhao8445 avatar

Watchers

James Cloos avatar  avatar

Forkers

terrorizer1980

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.