敏捷开发(agile)中story

版权声明:本文为博主原创文章,遵循 CC 4.0 by-sa 版权协议,转载请附上原文出处链接和本声明。
本文链接:https://blog.csdn.net/u013102039/article/details/18961889

Agile概念的比较详细的说明见:http://www.cnblogs.com/astar/archive/2012/02/28/Scrum.html

Story概念:

  • User Story是敏捷开发的基础,它不同于传统的瀑布式开发方式,而是把原本需求拆成最小粒度的Story,以方便拆分Task,估计开发时间,领取开发任务。
  • User Story是从用户的角度对系统的某个功能模块所作的简短描述
  • 一个 User Story 描述了项目中的一个小功能,以及这个功能完成之后将会产生什么效果,或者说能为客户创造什么价值
  • User Story是敏捷开发和管理的核心,要确保Story的输出质量。

Story优点和好处:

  • Being very short. They represent small chunks of business value that can be implemented in a period of days to weeks.
  • Allowing developer and client to discuss requirements throughout the project lifetime
  • Needing very little maintenance
  • Only being considered at the time of use
  • Maintaining a close customer contact
  • Allow projects to be broken into small increments
  • Suited to projects where the requirements are volatile or poorly understood. Iterations of discovery drive the refinement process.
  • May be easier to estimate development effort

User Story划分原则(INVEST规则):

  • 独立性(Independent):一定要保证Story在功能上的独立,尽量不要有Story之间的依赖,否则会大大影响将来的开发和测试。
  • 可谈判性(Negotiable):Scrum中的story不是瀑布开始某事中的Contract, Stories不必太过详细,开发人员可以给出适当的建议。
  • 有价值性(Valuable): Story需要体现出对于用户的价值。
  • 可估计性(Estimable):Story应可以估计出Task的开发时间。
  • 大小合适(Sized Right):关于Story的粒度,建议的开发工作量是3-5天(包含针对Story所做的开发者自测工作量),如果Story不能拆分到3-5天的开发粒度,则一定要确保该Story在一个迭代周期内可开发测试完成。
  • 可测试性(Testable):要从可测试性考虑需求,同时要考虑能够独立测试,每个任务都应有Junit Test。另外注意,伴随Story要同时输出可接受性测试用例(Acceptance Test Case,以下简称AT),用于验证Story是否开发完成,可以给测试人员做Story测试。AT用例在Story协作阶段只是对测试要点、场景的描述,在迭代开发阶段可以继续补充和完善。

Task:

  • 为了能够及时,高效地完成每个 Story,Scrum 团队会把每个 Story 分解成若干个 Task。
  • 每个Task 的时间最好不要超过8小时,保证在1个工作日内完成,如果 Task 的时间超过了8个小时,就说明Task的划分有问题,需要特别注意。

User Story模板:

  • User Story可以遵循以下模板:As a <User Type> I want to <achieve goal> So that  I can <get some value>
  •  翻译成中文就是:作为一个<某种类型的用户>,我要<达成某些目的>,我这么做的原因是<开发的价值>。

一些经验:

  • 永远不要在User Story中使用And和Or,因为这是些分支词就表示分支任务,把它们拆成两个Story.
  • 数据整理:通常情况下1个sprint(2周一次迭代)可以做4~5个Story,极端大的Story不可大于1个sprint。
  • 数据整理:通常情况下1个sprint(2周一次迭代)可以做50个左右的Task。
  • User Story用于描述用户故事,不要包括任何的技术,框架等内容。Task可以包括框架,技术等内容。

展开阅读全文

敏捷开发,我在agile java里面碰到的一个问题。

10-08

agile java里面的一个练习,感觉比较棘手,不知道该怎么做,有看过agile的,或者会做这道题的同学帮帮忙。帮我写出这个棋盘的代码,或者给点提示。最好给我这本书的练习答案。rn(This exercise and Exercise 5 are closely related. You may suspend refactoring until you have completed Exercise 5.) When a client creates a Board object, they should be able to assume that the board is already initialized, with pieces in place. You will need to modify the Board tests and code accordingly. Start by changing the assertions on the number of pieces available at time of board creation: There should be 16. Delete testAddPawns; it is not useful in its current form.rnrnAdd an initialize method to Board. The initialize method should add pawns to create two ranks: a rank for white pawns (the second rank) and a rank for black pawns (the seventh rank). To store a rank, use an ArrayList whose contents are Pawn objects. You declare such a list as ArrayList.rnrnAdd an assertion to testCreate that the second rank looks like this: "pppppppp". Assert that the seventh rank looks like this: "PPPPPPPP". Use a StringBuilder and a for loop to gather the printable representation for the pieces in each rank.rn国际象棋的棋盘,我不知道棋盘类board里面是不是需要一个rank变量,加上rank变量后又好像变得好复杂,似乎没这个必要。棋盘里面已经有了ArrayList属性了!rn[code=Java]rnpackage chess;rnrnimport java.util.ArrayList;rnimport java.util.Iterator;rnrnimport pieces.Pawn;rnrnpublic class Board rn private int pieces=16;rn private ArrayList pawns=new ArrayList();rn// private StringBuffer representation;rn private int size=64;rn private char[] ch=new char[size];rnrn public Board() rn// System.out.println(ch.toString().charAt(0));rn for (int i = 0; i < 8; i++) rn pawns.add(new Pawn());rn rn for (int i = 0; i < 8; i++) rn pawns.add(new Pawn("black"));rn rn// StringBuffer temp = new StringBuffer();rn// for (int i = 0; i < 8; i++) rn// pawns.add(new Pawn());rn// temp.append('p');rn// rn// assemble(temp);rn// for (int i = 0; i < 8; i++) rn// pawns.add(new Pawn("black"));rn// temp.append('P');rn// rn// assemble(temp);rn rnrn public String print(int beginIndex,int endIndex) rn // TODO Auto-generated method stubrn System.out.println(ch);rn return this.ch.toString().substring(beginIndex, endIndex);rn rnrn public void assemble(StringBuffer buffer) rn // TODO Auto-generated method stubrn if(buffer.toString().equals("pppppppp"))rn for (int i = 8; i < 16; i++) rn ch[i]=buffer.toString().charAt(i-8);rn// System.out.println(ch.toString());rn rn else if(buffer.toString().equals("PPPPPPPP"))rn for (int i = 49; i < 57; i++) rn ch[i]=buffer.toString().charAt(i-49);rn rn// for (int i = 0; i < buffer.length(); i++) rn// for (char c : buffer.toString().toCharArray()) rn// ch[i+8]=c;rn// rn// rn rnrn public int getPieces() rn return pieces;rn rnrn public void addPawn(Pawn pawn) rn // TODO Auto-generated method stubrn this.pieces++;rn pawns.add(pawn);rn rnrn public ArrayList getPawns() rn // TODO Auto-generated method stubrn return this.pawns;rn rnrn[/code]rnrnrn 论坛

没有更多推荐了,返回首页