Download the PHP package iblues/atu without Composer
On this page you can find all versions of the php package iblues/atu. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Package atu
Short Description Laravel ATU Base on annotation's and laravel phpunit.一个基于注解和laravel单元测试的 自动化测试包
License MIT
Informations about the package atu
Annotation-test-unit (ATU)
Laravel ATU : A phpunit Tool Base on annotation and laravel. 一个基于注解和laravel的单元测试包.
这个扩展包有啥用?
1.改变你的开发方式. 改完代码,切换浏览器/postman 请求接口 烦不烦? 2.顺带完成高覆盖测试. 后面配个视频在这里!~ qq交流群:814333044 兼容laravel5.5+/6/7
Installing
1.composer 安装
2.配置好单元测试,教程: https://www.w3cschool.cn/intellij_idea_doc/using_phpunit_framework.html PS:有效的设置测试环境 phpunit.xml 其中:
a.SESSION_DRIVER会设置为array, 避免脏环境.
b.QUEUE_DRIVER自动覆盖为sync, 方便测试和发现问题.
c.CACHE_DRIVER会设置为array, 避免脏环境.
d.也可以单独设置测试专用数据库
3.找一个控制器.增加注解.
4.执行以下命令,会创建tests/api/AtuTest.php. 测试该文件即可. Tips: ctrl+r / 开启toggle auto test 即可重新运行测试,加快效率!
如何更爽快的coding?
怎么爽快?
1.有完整的代码提示. 2.可以注解快速跳转.方便快速查看代码和文档
安装插件
1.安装phpstorm插件.
https://plugins.jetbrains.com/plugin/index?xmlId=de.espend.idea.php.annotation
2.设置插件 language & framew -> php ->annotations ->Use Alias 新增 Iblues\AnnotationTestUnit\Annotation as ATU
Usage
文档说明
FAQ
Q: 报错 got '@' at position A: 注解错误, 经常是少了逗号.
Q: 报错 got ''' A: 注解中请用双引号. 单引号不行. 如@ATU\Before("login");
Q: 报错 Illuminate\Contracts\Container\BindingResolutionException : Target class [env] does not exist. A: telescope冲突 解决办法件 TELESCOPE.md
TodoList
@ATU\ v1.0版本
- [x] Api
- [x] Now
- [x] Request
- [x] Response,正则支持
- [x] getRequest
- [x] Response
- [x] getResponse
- [x] Before
- [x] Degbug
- [x] Assert
- [x] Response
- [x] GetParam
- [x] Tag
- [x] response 关于 GetRequest和GetParam
- [x] request 关于 getParam
- [x] before 关于 getParam
- [x] Assert 关于 getParam
- [x] Ignore
- [x] RouteIgnore 忽略路由检查,(第三方扩展包中:写了注释,但是不一定绑定路由的用)
- [x] title
- [x] 全局debug (在测试文件中启动)
- [x] Telescope初步集成
- [x] before 高级: 在before中调用其他tag.进行关联性测试
-
[x] 增加关于日志的断言
v1.1
- [ ] artisan的测试
-
[ ] Request 文件上传,随机种子
v1.2
-
[ ] Template 测试模板的定义和调用
v1.3
- [ ] event断言
- [ ] Telescope完美集成
Contributing
You can contribute in one of three ways:
- File bug reports using the issue tracker.
- Answer questions or fix bugs on the issue tracker.
- Contribute new features or update the wiki.
The code contribution process is not very formal. You just need to make sure that you follow the PSR-0, PSR-1, and PSR-2 coding guidelines. Any new code contributions must be accompanied by unit tests where applicable.
License
MIT