如何在临时sql server上使用带有Robot Framework的数据库库 [英] How to use database library with Robot Framework on temporary sql server

查看:50
本文介绍了如何在临时sql server上使用带有Robot Framework的数据库库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用支持数据库验证的 Robot Framework 数据库库.

I am using Robot Framework's database library which supports database validation.

我尝试执行这个基本命令:

I tried to execute this basic command:

***Variables***
***Settings***
Suite Setup  
Suite Teardown  
Test Setup  
Test Teardown  
Library  DatabaseLibrary
***Testcases***
UC_DB_Validation

要连接到我正在使用的数据库:

To connect to the Database I'm using:

dbapiModuleName=Mysqldb  dbName='bigetestsrv'  dbUsername='ravitest'  dbPassword='welcome'  dbHost='10.73.92.18'

使用 pybot 从命令提示符运行连接字符串时,出现以下错误:

When running the connection string from command prompt using pybot I get the following error:

"No Module Named as Mysqldb"

我使用具有有效凭据的 Query Express,但我的机器上没有安装 Sql Server.

I am using Query Express with valid credentials and I do not have a Sql Server installed in my machine.

如何连接到我的数据库?

How can I connect to my DB?

推荐答案

我得到了.....

我以错误的方式接近数据库库(Apache 许可)来自http://franz-see.github.com/Robotframework-Database-Library/ 我目前仅使用 psycopg2 与 postgresql 一起测试,它可能会或可能不会与其他 RDBMS 一起使用.所以我尝试连接pymssql db,它支持bydefualt并且成功了.

I was approaching in a wrong way The Database Library (Apache License) from http://franz-see.github.com/Robotframework-Database-Library/ i am using is currently tested only with postgresql using psycopg2, it may or may not work with other RDBMS. So I tried it to connect pymssql db, which is supporting bydefualt and it worked.

我用过使用自定义参数 pymssql 'dbname', 'username', 'password', 'host' 连接到数据库

I used Connect To Database Using Custom Params pymssql 'dbname', 'username', 'password', 'host'

作为先决条件,我需要从以下位置安装 Pymssql(GNU 宽松通用公共许可证)http://pymssql.sourceforge.net/license.php

As a prerequisite i need to install Pymssql (GNU Lesser General Public License) from http://pymssql.sourceforge.net/license.php

谢谢

这篇关于如何在临时sql server上使用带有Robot Framework的数据库库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆