Hi All,
GTF: https://github.com/ZhangQin3/GTFGTF is a generic test automation framework based on golang, it is named as Golang Test Framework(GTF). Now, GTF is in its very early stage, but it has provide most necessary features that a mature testing framework shall provide, it can be used in unit test, integration test, system test and acceptance test with only a little simple adaption.
With GTF, one test script is a golang package in a single .go file, all the test scripts are put in the gtf/scripts directory. Related test scripts can get together and are put into a test suite, the test suite is also an .go file and a golang package located in the gtf/testsuites directory.
GTF generates one executable file(.exe) for each test suite, the executable file is put in the $gopath/bin/ directory. To generate an executable file for a test suite, you should build and run ignition.go package in gtf/drivers/ignition directory, this will generate a .exe file and puts it in $gopath/bin/.
Run the executable file( execute.exe for now) in $gopath/bin/, all the tests related with the test suite will be executed and logs for each test scripts will be generated and put in $gopath/bin/.
GTF Provides: 1) Test case level and test script level and test suite level setup and teardown. 2) HTML log output for each test script and the log file gives logs for each test case. 3) A simple way for creating customized test libraries(such as, Selenium, Telnet, SSH) with golang std libraries and gtf/log.
TBD: data driven/keyword driven support. log page internal jump.
Only support windows now.
Enjoy it.
BRs,
Zhang Qin
On Wednesday, December 3, 2014 9:30:30 PM UTC+8, egon wrote:I can't really understand what real-world problem this solves that go test & goconvey don't.+ Egon
I did not compare GTF to others. In fact, I did not know goconvey before, will study it later. I just wrote GTF according to my experience and some requirements in my area, and study golang with the project. ^_^
On Thursday, December 4, 2014 9:53:19 AM UTC+8, Zhang Qin wrote:
On Wednesday, December 3, 2014 9:30:30 PM UTC+8, egon wrote:
I can't really understand what real-world problem this solves that go test & goconvey don't.+ Egon
I did not compare GTF to others. In fact, I did not know goconvey before, will study it later. I just wrote GTF according to my experience and some requirements in my area, and study golang with the project.
^_^
- ZhangQin
After a quick scanning to goconvey, I found that goconvey mainly focuses on Golang unit test, it just tests Golang code, is that right?
As mentioned above, GTF is a “generic” "test automation framework" based on Golang, it is writen in Golang, but not only for Golang. It focuses on "generic", just uses Golang as a "script language", and puts more focus on function testing. It can be used to test functions of a router, a cable modem, Wifi, a web APP, and so on.
Compare with goconvey, GTF has:
1. generic testing
GTF is not only for unit test, it focuses on function test as what mentioned above.
2. testcase definition
With testcase definition, the applicability, requirements, priority and feature can be defined,
then testcases can be filterd and run by these attributes, you can just run parts of script , and will not run a testcase if its requirements are not setisfied. Test definition also gives the testcase a brief description.
3. setup and teardown for various levels
Test case level, test script level and test suite level setup and teardown.
4. step-lized tests
There are clear steps in the testcase, every step has its function and description, this is import for test results analysis.
The name Golang Test Framework(GTF) may has some misleading, but I think it's OK.
--ZhangQin
So, if you did not know what it was and what difficulty it faced, and you did read the code carefully, you should not give you comment arbitrarily by just a quick glance and you even did not read my post carefully.
if x && z {z = wif t {print(r)}}