要采取的步骤进行单元测试慢慢整合成一个项目 [英] Steps to take to slowly integrate unit-testing into a project

查看:77
本文介绍了要采取的步骤进行单元测试慢慢整合成一个项目的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我目前在合作社内对一期工程已接近完成与另一个合作学生工作。由于该项目已经从合作社传下来的co-op,他们的不良做法已经沿途拍摄和测试一直留到最后。我已经决定,我想编写单元测试边学边测试。新的东西

I'm currently on a co-op term working on a project nearing completion with one other co-op student. Since this project has been passed down from co-op to co-op, poor practices have been taken along the way and testing has been left until the end. I've decided I'd like to write unit-tests to learn something new while testing.

不过,我工作的一个3层,紧耦合的应用程序,似乎是不可能的,以目前的形式的单元测试。我不希望通过重构的code面目全非隔夜甩开其他合作社的学生,没有任何的这些概念的知识。所以,我应该采取什么措施来慢慢拉向单位可测试性code?我应该先实现一个工厂模式,让学生等行动前熟习呢?

However, I'm working on a 3-tier, tightly coupled app that seems impossible to unit test in its current form. I don't want to throw off the other co-op student with no knowledge of any of these concepts by refactoring the code beyond recognition overnight. So what steps should I take to slowly pull the code towards unit-testability? Should I first implement a factory pattern and let the other student familiarize themselves with that before moving forward?

我的道歉,如果我的知识是有缺陷的,应该没有任何问题。我是新来的:)

My apologies if my knowledge is flawed and there should be no issue whatsoever. I'm new to this :)

推荐答案

与传统code有效运作由迈克尔·羽毛

很难知道是否实现工厂模式会带来什么好处,取决于什么code做:)

Hard to know if implementing a factory pattern will do any good, depends on what the code is doing :)

这篇关于要采取的步骤进行单元测试慢慢整合成一个项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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