html tool

显示标签为“testlink”的博文。显示所有博文
显示标签为“testlink”的博文。显示所有博文

2016年9月11日星期日

testlink中添加dev key

问题:
使用Testlink api 要求添加devKey如下:
参见:https://github.com/lczub/TestLink-API-Python-client/blob/master/doc/usage.rst
[PYENV]\testlink\Scripts\activate
set TESTLINK_API_PYTHON_SERVER_URL=http://[YOURSERVER]/testlink/lib/api/xmlrpc/v1/xmlrpc.php
set TESTLINK_API_PYTHON_DEVKEY=[Users devKey generated by TestLink]
python
>>> import testlink
>>> tls = testlink.TestLinkHelper().connect(testlink.TestlinkAPIClient)
>>> tls.countProjects()

解决:
add:http://www.softwaretestingconcepts.com/test-automation-using-testlink-xmlrpc-api-steps-and-sample-python-client-program

Steps to enable Testlink API via xmlrpc and generate dev key:

  1. Open config.inc.php
  2. Search for  /** XML-RPC API availability (disabled by default) */ $tlCfg->api->enabled = FALSE;
  3. Change FALSE to TRUE $tlCfg->api->enabled = TRUE;
  4. Save config.inc.php
  5. Login to Testlink UI as admin
  6. Go to 'My Settings'
  7. Under API interface, click 'Generate new key'
  8. Copy the key generated
  9. Substitute your newly generated devKey in the client program Example: client = TestlinkAPIClient(devKey="abc04556463cd813a1ea05caf042d42f")
This should be sufficient for a test the Testlink xmlrpc API client server communication. You can then go ahead and use the client program as a library to be called from within your python test scripts (talking from a Selenium python user perspective). You could do similar implementation with other scripts.
Hope you find this useful.

2016年8月14日星期日

How to install and configure Testlink

add:http://informaticandocr.blogspot.com/2013/01/how-to-install-and-configure-testlink.html
---------------------------------------------------------------

Prerequisites:
- Java JDK
- MySQL Server
- Apache Web Server
- PHP5

Notes:
a. This tutorial was created using the following version of each software needed.
- Ubuntu 10.04 i386 as OS.
- TestLink 1.9.2
- MySQL 5.1
- Apache2

b. The installation of prerequisites is detailed at the end of the document.

c. As a personal recommendation, before start the testlink installer in the browser, set up the files and prerequisites to make the installation experience faster and easier.

Let’s Go!

1. Download & install some necessary packages
sudo apt-get install php5-mysql php5-pgsql php5-gd php5-ldap php-pear

2. Edit the php.ini file located in /etc/php5/apache2 and set the following parameters:
max_execution_time = 120
session.gc_maxlifetime = 2700

3.Restart the apache server

4. Download testlink:

5. Unpack your testlink package, change the name and copy to your /www apache directory:
5.1 Unpack
tar zxvf testlink-1.9.2.tar.gz
5.2 Change the name
mv testlink-1.9.2.tar.gz testlink
5.3 Copy to the /www directory
sudo cp -r teslink /var/www/testlink

6. Once you have it in your /www directory change the permissions of some folders in your testlink directory:
# chmod 777 gui/templates_c
# chmod 777 logs
# chmod 777 upload_area

7. Go to your browser and access the testlink installer at: localhost/testlink and follow the instructions in your screen.

8. If everything went well installer will tell you that the configuration file was not written, to do this, go to /var/www/testlink and create a file named config_db.inc.php with the information provided in the installer.

9. Now you can close your browser for a while.

10. The last step is change a configuration file by editing the file in /var/www/testlink/config.inic.php and set the following parameters:

$tlCfg->config_check_warning_mode = 'SILENT'
$tlCfg->api->enabled = TRUE;
$tlCfg->exec_cfg->enable_test_automation = ENABLED;

11. Done!. Now you can go to localhost/testlink and login with the username: admin and password: admin

[popexizhi:很有效的blog i like ]