Robot Framework connects MySQL via PYODBC

Source: Internet
Author: User
Tags mysql odbc driver

The first is the installation of the environment:

1. Install Python2.7, do not install version 3.5, because many dependent libraries do not support the latest version

2. Install robot framework,databaselibrary,pyodbc,selenium2library,appiumlibrary Online via Pip (the next two are Web test and mobile test libraries)

Pip Install Robotframework

Pip Install Robotframework-databaselibrary

Pip Install Robotframework-selenium2library

Pip Install Robotframework-appiumlibrary

Pip Install Pyodbc

3. Install Wxpython because the dependency is required to run ride and cannot download the latest version

Version Wxpython2.8-win32-unicode-2.8.12.1-py27.exe or Wxpython2.8-win64-unicode-2.8.12.1-py27.exe

Https://sourceforge.net/projects/wxpython/files/wxPython/2.8.12.1/

4. Download ride and install, unzip and switch to directory run Python setup.py install

Https://pypi.python.org/pypi/robotframework-ride

5. New shortcut on desktop, object position input

D:\Python27\pythonw.exe-c "from robotide import main; Main () "

6. Download MySQL ODBC driver and install

http://dev.mysql.com/downloads/connector/odbc/

Start running ride below

Create a new project, create a new testsuit, and TestCase

Project and Testsuit all have plug-in imports, note that this scope is not the same, otherwise it will be reported that the keyword can not be found. For insurance purposes, two places are imported.

Import plugin note case, databaselibrary to write databaselibrary, there are selenium2library and appiumlibrary

Driver={mysql ODBC 5.3 Unicode Driver} is available through the Control Panel-Administrative Tools-Data source-added list

The support for Chinese is better with the PYODBC connection database. After the point is run, you can test it automatically.

keyword in the guide after the F5 can be queried.

Robot Framework connects MySQL via PYODBC

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.