QQ:394735564 最近领导打算把新项目用QTP来实现自动化,所以我想借此机会对原来的winrunner框架进行优化.欢迎大家加我QQ一起探讨交流.

发布新日志

  • 45 个 LoadRunner 面试问题(附答案)

    2010-12-08 21:01:42

     1. What is load testing? -Load testing is to test that if the application works fine with the loads that result from large number of simultaneous users, transactions and to determine weather it can handle peak usage periods.
      2. What is Performance testing?- Timing for both read and update transactions should be gathered to determine whether system functions are being performed in an acceptable timeframe. This should be done standalone and then in a multi user environment to determine the effect of multiple transactions on the timing of a single transaction.
      3. Did u use LoadRunner? What version?- Yes. Version 7.2.
      4. Explain the Load testing process?
      Step 1: Planning the test.Here, we develop a clearly defined test plan to ensure the test scenarios we develop will accomplish load-testing objectives. Step 2: Creating Vusers.Here, we create Vuser scrīpts that contain tasks performed by each Vuser, tasks performed by Vusers as a whole, and tasks measured as transactions. Step 3: Creating the scenario.A scenario describes the events that occur during a testing session. It includes a list of machines, scrīpts, and Vusers that run during the scenario. We create scenarios using LoadRunner Controller. We can create manual scenarios as well as goal-oriented scenarios. In manual scenarios, we define the number of Vusers, the load generator machines, and percentage of Vusers to be assigned to each scrīpt. For web tests, we may create a goal-oriented scenario where we define the goal that our test has to achieve. LoadRunner automatically builds a scenario for us.
      We emulate load on the server by instructing multiple Vusers to perform. tasks simultaneously. Before the testing, we set the scenario configuration and scheduling. We can run the entire scenario, Vuser groups, or individual Vusers.
      We monitor scenario execution using the LoadRunner online runtime, transaction, system resource, Web resource, Web server resource, Web application server resource, database server resource, network delay, streaming media resource, firewall server resource, ERP server resource, and Java performance monitors. Step 6: Analyzing test results.During scenario execution, LoadRunner records the performance of the application under different loads. We use LoadRunner’s graphs and reports to analyze the application’s performance.
      5. When do you do load and performance Testing?- We perform. load testing once we are done with interface (GUI) testing. Modern system architectures are large and complex. Whereas single user testing primarily on functionality and user interface of a system component, application testing focuses on performance and reliability of an entire system. For example, a typical application-testing scenario might depict 1000 users logging in simultaneously to a system. This gives rise to issues such as what is the response time of the system, does it crash, will it go with different software applications and platforms, can it hold so many hundreds and thousands of users, etc. This is when we set do load and performance testing.
      6. What are the components of LoadRunner?- The components of LoadRunner are The Virtual User Generator, Controller, and the Agent process, LoadRunner Analysis and Monitoring, LoadRunner Books Online.
      7. What Component of LoadRunner would you use to record a scrīpt?- The Virtual User Generator (VuGen) component is used to record a scrīpt. It enables you to develop Vuser scrīpts for a variety of application types and communication protocols.
      8. What Component of LoadRunner would you use to play Back the scrīpt in multi user mode?- The Controller component is used to playback the scrīpt in multi-user mode. This is done during a scenario run where a vuser scrīpt is executed by a number of vusers in a group.
      9. What is a rendezvous point?- You insert rendezvous pointsinto Vuser scrīpts to emulate heavy user load on the server. Rendezvous pointsinstruct Vusers to wait during test execution for multiple Vusers to arrive at a certain point, in order that they may simultaneously perform. a task. For example, to emulate peak load on the bank server, you can insert a rendezvous point instructing 100 Vusers to deposit cash into their accounts at the same time.
      10. What is a scenario?- A scenario defines the events that occur during each testing session. For example, a scenario defines and controls the number of users to emulate, the actions to be performed, and the machines on which the virtual users run their emulations.
      11. Explain the recording mode for web Vuser scrīpt?- We use VuGen to develop a Vuser scrīpt by recording a user performing typical business processes on a client application. VuGen creates the scrīpt by recording the activity between the client and the server. For example, in web based applications, VuGen monitors the client end of the database and traces all the requests sent to, and received from, the database server. We use VuGen to: Monitor the communication between the application and the server; Generate the required function calls; and Insert the generated function calls into a Vuser scrīpt.
      12. Why do you create parameters?- Parameters are like scrīpt variables. They are used to vary input to the server and to emulate real users. Different sets of data are sent to the server each time the scrīpt is run. Better simulate the usage model for more accurate testing from the Controller; one scrīpt can emulate many different users on the system.
      13. What is correlation? Explain the difference between automatic correlation and manual correlation?- Correlation is used to obtain data which are unique for each run of the scrīpt and which are generated by nested queries. Correlation provides the value to avoid errors arising out of duplicate values and also optimizing the code (to avoid nested queries). Automatic correlation is where we set some rules for correlation. It can be application server specific. Here values are replaced by data which are created by these rules. In manual correlation, the value we want to correlate is scanned and create correlation is used to correlate.
      14. How do you find out where correlation is required? Give few examples from your projects?- Two ways:First we can scan for correlations, and see the list of values which can becorrelated. From this we can pick a value to be correlated. Secondly, we can record two scrīpts and compare them. We can look up the difference file to see for the values which needed to be correlated.  In my project, there was a unique id developed for each customer, it was nothing but Insurance Number, it was generated automatically and it was sequential and this value was unique. I had to correlate this value, in order to avoid errors while running my scrīpt. I did using scan for correlation.
      15. Where do you set automatic correlation options?- Automatic correlation fromweb point of viewcan be set in recording options and correlation tab. Here we can enable correlation for the entire scrīpt and choose either issue online messages or offline actions, where we can define rules for that correlation. Automatic correlation for database can be done using show output window and scan for correlation and picking the correlate query tab and choose which query value we want to correlate. If we know the specific value to be correlated, we just do create correlation for the value and specify how the value to be created.
      16. What is a function to capture dynamic values in the web Vuser scrīpt?- Web_reg_save_param function saves dynamic data information to a parameter.
      17. When do you disable log in Virtual User Generator, When do you choose standard and extended logs?- Once we debug our scrīpt and verify that it is functional, we can enable logging for errors only. When we add a scrīpt to a scenario, logging is automatically disabled.Standard Log Option:When you select;zLz Y7k
      Standardlog, it creates a standard log of functions and messages sent during scrīpt execution to use for debugging. Disable this option for large load testing scenarios. When you copy a scrīpt to a scenario, logging is automatically disabledExtended Log Option:SelectP [#OC6S2TU [qjr%U
      extendedlog to create an extended log, including warnings and other messages. Disable this option for large load testing scenarios. When you copy a scrīpt to a scenario, logging is automatically disabled. We can specify which additional information should be added to the extended log using the Extended log options.
      18. How do you debug a LoadRunner scrīpt?- VuGen contains two options to help debug Vuser scrīpts-the Run Step by Step command and breakpoints. The Debug settings in the Options dialog box allow us to determine the extent of the trace to be performed during scenario execution. The debug information is written to the Output window. We can manually set the message class within your scrīpt using the lr_set_debug_message function. This is useful if we want to receive debug information about a small section of the scrīpt only.
      19. How do you write user defined functions in LR? Give me few functions you wrote in your previous project?- Before we create the User Defined functions we need to create the externalt4l]j*i
      library (DLL) with the function. We add this library to VuGen bin directory. Once the library is added then we assign user defined function as a parameter. The function should have the following format: __declspec (dllexport) char* <function name>(char*, char*)Examples of user defined functions are as follows:GetVersion, GetCurrentTime, GetPltform. are some of the user defined functions used in my earlier project.
      20. What are the changes you can make in run-time settings?- The Run Time Settings that we make are: a)Pacing- It has iteration count. b)Log- Under this we have Disable Logging Standard Log and c)ExtendedThink Time- In think time we have two options like Ignore think time and Replay think time. d)General- Under general tab we can set the vusers as process or as multithreading and whether each step as a transaction.
      21. Where do you set Iteration for Vuser testing?- We set Iterations in the Run Time Settings of the VuGen. The navigation for this is Run time settings, Pacing tab, set number of iterations.
      22. How do you perform. functional testing under load?- Functionality under load can be tested by running several Vusers concurrently. By increasing the amount of Vusers, we can determine how much load the server can sustain.
      23. What is Ramp up? How do you set this?- This option is used to gradually increase the amount of Vusers/load on the server. An initial value is set and a value to wait between intervals can be specified. To set Ramp Up, go to ‘Scenario Scheduling Options
      24. What is the advantage of running the Vuser as thread?- VuGen provides the facility to use multithreading. This enables more Vusers to be run pergenerator. If the Vuser is run as a process, the same driver program is loaded into memory for each Vuser, thus taking up a large amount of memory. This limits the number of Vusers that can be run on a single
      0generator. If the Vuser is run as a thread, only one instance of the driver program is loaded into memory for the given number Vusers (say 100). Each thread shares the memory of the parent driver program, thus enabling more Vusers to be run per generator.
      25. If you want to stop the execution of your scrīpt on error, how do you do that?- The lr_abort function aborts the execution of a Vuser scrīpt. It instructs the Vuser to stop executing the Actions section, execute the vuser_end section and end the execution. This function is useful when you need to manually abort a scrīpt execution as a result of a specific error condition. When you end a scrīpt using this function, the Vuser is assigned the status "Stopped". For this to take effect, we have to first uncheck the “Continue on error” option in Run-Time Settings.
     
     
      26. What is the relation between Response Time and Throughput?- The Throughput graph shows the amount of data in bytes that the Vusers received from the server in a second. When we compare this with the transaction response time, we will notice that as throughput decreased, the response time also decreased. Similarly, the peak throughput and highest response time would occur approximately at the same time.
      27. Explain the Configuration of your systems?- The configuration of our systems refers to that of the client machines on which we run the Vusers. The configuration of any client machine includes its hardware settings, memory, operating system, software applications, development tools, etc. This system component configuration should match with the overall system configuration that would include the network infrastructure, the web server, the database server, and any other components that go with this larger system so as to achieve the load testing objectives.
      28. How do you identify the performance bottlenecks?- Performance Bottlenecks can be detected by using monitors. These monitors might be application server monitors, web server monitors, database server monitors and network monitors. They help in finding out the troubled area in our scenario which causes increased response time. The measurements made are usually performance response time, throughput, hits/sec, network delay graphs, etc.
      29. If web server, database and Network are all fine where could be the problem?- The problem could be in the system itself or in the application server or in the code written for the application.
      30. How did you find web server related issues?- Using Web resource monitors we can find the performance of web servers. Using these monitors we can analyze throughput on the web server, number of hits per second that4y#U[F:H5q
          occurred during scenario, the number of http responses per second, the number of downloaded pages per second.
      31. How did you find database related issues?- By running “Database” monitor and help of “Data Resource Graph” we can find database related issues. E.g. You can specify the resource you want to measure on before running the controller and than you can see database related issues
      32. Explain all the web recording options?
      33. What is the difference between Overlay graph and Correlate graph?-Overlay Graph: It overlay the content of two graphs that shares a common x-axis. Left Y-axis on the merged graph show’s the current graph’s value & Right Y-axis show the value of Y-axis of the graph that was merged. Correlate Graphlot the Y-axis of two graphs against each other. The active graph’s Y-axis becomes X-axis of merged graph. Y-axis of the graph that was merged becomes merged graph’s Y-axis.
      34. How did you plan the Load? What are the Criteria?- Load test is planned to decide the number of users, what kind of machines we are going to use and from where they are run. It is based on 2 important documents, Task Distribution Diagram and Transaction profile. Task Distribution Diagram gives us the information on number of users for a particular transaction and the time of the load. The peak usage and off-usage are decided from this Diagram. Transaction profile gives us the information about the transactions name and their priority levels with regard to the scenario we are deciding.
      35. What does vuser_init action contain?- Vuser_init action contains procedures to login to a server.
      36. What does vuser_end action contain?- Vuser_end section contains log off procedures. 
      37. What is think time? How do you change the threshold?-  Think timeis the time that a real user waits between actions. Example: When a user receives data from a server, the user may wait several seconds to review the data before responding. This delay is known as thethink time. Changing the Threshold: Threshold level is the level below which the recorded think time will be ignored. The default value is five (5) seconds. We can change the think time threshold in the Recording options of the Vugen.
      38. What is the difference between standard log and extended log?- The standard log sends a subset of functions and messages sent during scrīpt execution to a log. The subset depends on the Vuser type Extended log sends a detailed scrīpt execution messages to the output log. This is mainly used during debugging when we want information about: Parameter substitution. Data returned by the server. Advanced trace.
      39. Explain the following functions:-lr_debug_message- The lr_debug_message function sends a debug message to the output log when the specified message class is set.lr_output_message- The lr_output_message function sends notifications to the Controller Output window and the Vuser log file.lr_error_message- The lr_error_message function sends an error message to the LoadRunner Output window.lrd_stmt- The lrd_stmt function associates a character string (usually a SQL statement) with a cursor. This function sets a SQL statement to be processed.lrd_fetch- The lrd_fetch function fetches the next row from the result set.
      40. Throughput-  If the throughput scales upward as time progresses and the number of Vusers increase, this indicates that the bandwidth is sufficient.If the graphwere to remain relatively flat as the number of Vusers increased, it would
      be reasonable to conclude that the bandwidth is constraining the volume of delivered.
      41. Types of Goals in Goal-Oriented Scenario-  Load Runner provides you with five different types of goals in a goal oriented scenario:
              * The number of concurrent Vusers
              * The number of hits per second
              * The number of transactions per second
              * The number of pages per minute
              * The transaction response time that you want your scenario
      42. Analysis Scenario (Bottlenecks):In Running Vuser graph correlated with the response time graph you can see that as the number of Vusers increases, the average response time of the check itinerary transaction very gradually increases. In other words, the average response time steadily increases as the load
          0increases. At 56 Vusers, there is a sudden, sharp increase in the average response
          0time. We say that the testbroke the server.That is the mean time before failure (MTBF). The response time clearly began to degrade when there were more than 56 Vusers running simultaneously.
      43. What is correlation? Explain the difference between automatic correlation and manual correlation?- Correlation is used to obtain data which are unique for each run of the scrīpt and which are generated by nested queries. Correlation provides the value to avoid errors arising out of duplicate values and also optimizing the code (to avoid nested queries). Automatic correlation is where we set some rules for correlation. It can be application server specific.Here values are replaced by data which are created by these rules. In manual correlation, the value we want to correlate is scanned and create correlation is used to correlate.
      44. Where do you set automatic correlation options?- Automatic correlation from web point of view, can be set in recording options and correlation tab. Here we can enable correlation for the entire scrīpt and choose either issue online messages or offline actions, where we can define rules for that correlation.  Automatic correlation for database, can be done using show output window and scan for correlation and picking the correlate query tab and choose which query value we want to correlate. If we know the specific value to be correlated, we just do create correlation for the value and specify how the value to be created.
      45. What is a function to capture dynamic values in the web vuser scrīpt?- Web_reg_save_param function saves dynamic data information to a parameter.
  • QTP DOM知识

    2009-05-31 20:15:05

    在使用QTP测试WEB页面时,经常需要利用测试对象中的Object属性来访问和操作DOM,因此,QTP自动化测试工程师非常有必要掌握一些常用的DOM知识。 下面就列举了一些常用的DOM属性、方法和集合:
      常用DOM 属性

      ●  className.同一样式规则的元素用相同的类名。可以通过className快速过滤出一组类似的元素。

      ●  document.用于指向包含当前元素的文档对象。

      ●  id.当前元素的标识。如果文档中包含多个相同id的元素,则返回一个数组。

      ●  innerHTML.用于指向当前元素的开始标记和结束标记之间的所有文本和HTML标签。

      ●  innerText.用于指向当前元素的开始标记和结束标记之间的所有文本和HTML标签。

      ●  offsetHeight, offsetWidth.元素的高度和宽度。

      ●  offsetLeft, offsetTop.当前元素相同对于父亲元素的左边位置和顶部位置。

      ●  outerHTML.当前元素的开始标记和结束标记之间的所有文本和HTML标签。

      ●  outerText.当前元素的开始标记和结束标记之间的所有文本,但不包括HTML标签。

      ●  parentElement.当前元素的父亲元素。

      ●  sourceIndex.元素在document.all集合中的索引(index)。

      ●  style.元素的样式表单属性。

      ●  tagName.当前元素的标签名。

      ●  title.在IE中,代表元素的tool tip文本。

      常用DOM 方法

      ●  click().模拟用户对当前元素的鼠标点击。

      ●  contains(element).用于判断当前元素是否包含指定的元素。

      ●  getAttribute(attributeName, caseSensitive).返回当前元素所包含的某个属性,参数attributeName为属性名、caseSensitive表示是否大小写敏感。

      ●  setAttribute(attributeName, value, caseSenstive). 设置当前元素的属性。

      常用DOM 集合

      ●  All[].当前元素中包含的所有HTML元素的数组。

      ●  children[].当前元素包含的孩子元素。

  • WinRunner所有属性(转)

    2009-02-03 14:47:23

    WinRunner所有属性

                  下面的表格包括所有WRContext Sensitive测试中使用的属性。表格分成可移动属性、半移动属性和不可移动属性。

                  注意:XRunner中创建的脚本不能在WR中使用。

                  可移动属性

     

    属性

    描述

    abs_x

    对象左上角对应屏幕左上角的x轴相对坐标

    abs_y

    对象左上角对应屏幕左上角的y轴相对坐标

    attached_text

    靠近对象的静态文本

    class

    请参考类属性

    class_index

    用来标识对象的序号,和窗体中其他同类对象的位置有关(只在JAVA插件加载的情况下)

    count

    菜单中包含的菜单项目的数量

    displayed

    一个布尔值,用来指出对象是否被显示:1表示在屏幕上可见,0表示不可见

    enabled

    一个布尔值,用来指出对象是否可用:1表示可用,0不可用

    focused

    一个布尔值,用来指出键盘输入是否直接到达对象:1表示对象有键盘聚焦,0没有

    height

    对象的高度(以象素为单位)

    html_url

    一个URL(只在WebTest情况下)

    label

    对象上显示的文本

    maximizable

    一个布尔值,用来指出对象是否可最大化:1表示可以,0不可以

    minimizable

    一个布尔值,用来指出对象是否可最小化:1表示可以,0不可以

    module_name

    一个可执行文件的名称,这个文件创建了特定的窗体

    nchildren

    对象拥有的所有子元素的数量

    NSTBTitle

    浏览器中一个工具栏的标题(只在WebTest中)

    NSTitle

    浏览器的标题(只在WebTest中)

    num_columns

    表格对象(只在Terminal Emulator软件中)

    num_rows

    表格对象(只在Terminal Emulator软件中)

    parent

    对象的父对象的逻辑名


    part_value

    一组中的radion buttoncheck box的名称(只在WebTest中)

    position

    菜单项目在菜单中从上到下的位置(第一个项目在位置0

    submenu

    布尔值,用来指出菜单项目是否有子菜单:1表示有,0没有

    value

    在不同类中含义不同:

    Radion check button1表示已经被选,0表示未被选

    菜单项目:1表示菜单已经被选,0表示未被选

    List对象:指出被选择项目的文本字符串

    Edit/Static对象:指出文本区域的内容

    滚动对象:指出滚动位置

    所有其他对象:value属性是一个空字符串(null string)

    width

    对象的宽度(以象素为单位)

    x

    对象左上角对应窗口原点的x轴坐标

    y

    对象左上角对应窗口原点的y轴坐标

     

    半移动属性

     

    属性

    描述

    handle

    一个指向对象的运行指针:HWND handle

    TOOLKIT_class

    特定toolkit类的值。在视窗系统中这个属性的值和MSW_class的值相同。

     

    不可移动的Microsoft Windows属性

     

    属性

    描述

    active

    布尔值,指出窗口是否被激活

    MSW_class

    Microsoft Windows

    MSW_id

    Microsoft Windows ID

    obj_col_name

    DataWindow和列名称的串联。PowerBuilder插件下,对于edit field对象而言是指明列的名称。

    owner

    窗体所属的软件的名称

    pb_name

    开发人员给PowerBuilder对象分配的字符串,只在PowerBuilder插件下有效。


    regexp_label

    使WR用可变卷标识别对象的字符串和常规表达式

    regexp_MSW class

    Microsoft Windows class结合一个常规表达式,使WR能识别包含可变MSW_class的对象

    sysmenu

    布尔值,指出一个菜单项目是否是系统菜单的一部分

    text

    对象或窗体的可见文本

    vb_name

    开发人员给Visual Basic对象分配的字符串,只在Visual Basic插件下有效。

  • 成功和少妇上床攻略(哈佛评论)

    2008-11-07 11:27:32

    成功和少妇上床攻略(哈佛评论)


    一男赶集卖猪,天黑遇雨,二十头猪未卖成,到一农家借宿。
      少妇说:家里只一人不便。
      男:求你了大妹子,给猪一头。
      女:好吧,但家只有一床。
      男:我也到床上睡,再给猪一头。
      女:同意。
      半夜男与女商量,我到你上面睡,女不肯。
      男:给猪两头。
      女允,要求上去不能动。
      少顷,男忍不住,央求动一下,女不肯。
      男:动一下给猪两头。女同意。
      男动了八次停下,女问为何不动?
      男说猪没了。
      女小声说:要不我给你猪……
      天亮后,男吹着口哨赶30头(含少妇家的10头)猪赶集去了……

      哈佛导师评论:要发现用户潜在需求,前期必须引导,培养用户需求,因此产生的投入是符合发展规律的。


      (加强篇)
      另一男得知此事,决意如法炮制,遂赶集卖猪,天黑遇雨,二十头猪未卖成,到一农家借宿
      少妇说:家里只一人不便。
      男:求你了大妹子,给猪一头
      女:好吧,但家只有一床。
      男:我也到床上睡,再给猪一头。
      女:同意。
      半夜男商女,我到你上面睡,女不肯。
      男:给猪两头。
      女允,要求上去不能动。
      少顷,男忍不住,央求动一下,女不肯。
      男:动一下给猪两头。女同意。
      男动了七次停下,女问为何不动?
      男说:完事了~~~女:......
      天亮后,男低著头赶2头猪赶集去了......


      哈佛导师评论:要结合企业自身规模进行谨慎投资,谨防资金链断裂问题



      又一男得知此事,决意如法炮制兼吸取教训,遂先用一头猪去换一粒伟哥,事必,天亮后,男吹着口哨赶38头(含少妇家的18头)猪赶集去了……


      哈佛导师评论:企业如果获得金融资本的帮助,自身经营能力将得到倍增。



      知道此法男多,伟哥供不应求,逐渐要2头,3头猪换一粒伟哥。


      哈佛导师评论:这就是通货膨胀。



      当猪价格涨到16粒一棵的时候,哈佛导师评论:该男已经进入边际成本,除了拥有对自身能力的自信和未来良好愿望以外,实际现猪流已经为零。

      但换猪男越来越多,卖伟哥的决定,扩展生产能力,推出一种次级伟哥,如果你缺一头猪,只要你承诺可以到该女房中一夜,就可以先借,事成后补交猪款,这个方法大大促进了伟哥销售。



      哈佛导师评论:这就是贷款,让企业可以根据未来的收益选择借支流动资金


      伟哥专卖店后来在即使你一头猪都没有,只要你承诺可以到该女房中一夜,就可以先借,事成后补交猪款。

      哈佛导师评论:这就是金融创新,让现在的人花未来的钱,反正等你老了未来的钱你也花不动。

      消息一出,换猪男越来越多,有人找伟哥专卖店,这个项目太好了,我们把它变成优质基金,对外销售债卷,你们也就可以分享我的收益,如何?

      结果伟哥专卖店觉得甚好,于是该公司把换猪男分三类,一类是拿现猪换的,一类是一部分现猪贷的,一类是完全没有现猪借的,发行三种债卷。大家踊跃而上。纷纷购买伟哥专卖店的债卷,伟哥专卖店生意太好,就把债卷销售外包给另外一家公司运作,该公司也一并大发其财,公司越做越大,甚至可以脱离实际伟哥销售情况来发行,给自己和伟哥专卖店带来巨大的现金收益。

      哈佛导师评论:这就是专业的人做专业的事,从实体经营到资本运作,经济进入了更高的层次。


      为了防止自己债卷未来有损失,该公司决定给它买上保险,这样债卷销售就更容易,因为一旦债卷出现问题,还可以获得保险公司的赔付,哇,债券公司销售这下子太好了,保险公司也获得巨大平白无故的保险收入。

      哈佛导师评论:这就是风险对冲,策略联盟,提高了企业的抗风险能力,也保护了消费者利益。



      换猪男太多,排长队等待,该女无法承受,说老娘不干了,我搬家,一时间有无数拥有伟哥的欠猪男。

      哈佛导师评论:这是个别现象,属于市场的正常波动,不会影响整个经济。



      结果该女迟迟不肯搬回。一部分欠猪男没有收入,只好赖帐,结果大量债卷到期无法换现猪吃,债卷公司一看,一粒伟哥16头猪,这哪里还得起,宣布倒闭

      哈佛导师评论:这是次贷危机,不会影响整个金融行业。




      哪里晓得债卷公司还把债卷上了保险,保险公司一看,这哪里赔得起,于是也宣布要倒闭。
    哈佛导师评论:这是金融危机,还不会影响整个实体经济。
  • 极限编程

    2007-11-21 21:59:41

          极限编程(Extreme Programming,XP)是一门针对业务和软件开发的规则,它的作用在于将两者的力量集中在共同的、可以达到的目标上。它是以符合客户需要的软件为目标而产生的一种方法论,XP使开发者能够更有效的响应客户的需求变化,哪怕是在软件生命周期的后期。它强调,软件开发是人与人合作进行的过程,因此成功的软件开发过程应该充分利用人的优势,而弱化人的缺点,突出了人在软件开发过程中的作用。极端编程属于轻量级的方法,认为文档、架构不如直接编程来的直接。

          XP实际上是一种经历过很多实践考验的一种软件开发的方法,它诞生了大概有5 年,它已经被成功的应用在许多大型的公司,如:Bayeris che Landesbank,Credit Swis s Life,DaimlerChrysler,First Union National Bank Ford Motor Company and UBS.XP 的成功得益于它对客户满意度的特别强调,XP 是以开发符合客户需要的软件为目标而产生的一种方法论,XP 使开发者能够更有效的响应客户的需求变化,哪怕在软件生命周期的后期。

      同时,XP 也很强调团队合作。团队包括:项目经理,客户,开发者。他们团结在一起来保证高质量的软件。XP 其实是一种保证成功的团队开发的简单而有效的方法。

      XP 强调四种价值:交流,简易,回馈,勇气。XP 程序员之间紧密的相互交流,XP 程序员也和客户紧密的交流。他们总是保持他们的设计简单明了。项目一开始,XP 就强调通过对软件的不断测试来获得反馈,程序员尽可能早的把软件交给客户,并实现客户对软件需求提出的变化,有了这些基础,XP 程序员就可以自信的面对需求和软件技术的变化。

      XP 是与众不同的,它有点象快步的舞蹈。XP 开发过程包括许多的小卡片,独立的看,这些小卡片没有什么意义,但是当它们组合在一起,一幅完整的美丽的图片就可以看见,XP方法有别于传统软件开发,它是软件开发的一种新的重要的发展。它改变了我们开发程序的传统思维方式。下面我们将介绍它带给我们那些改变。
     
      XP属于轻量开发方法中较有影响的一种方法。轻量开发方法是相对于传统的重量开发方法而言。简单地理解,“量”的轻重是指用于软件过程管理和控制的、除程序量以外的“文档量”的多少。XP等轻量开发方法认识到,在当前很多情况下,按传统观念建立的大量文档,一方面需要消耗大量开发资源,同时却已失去帮助“预见、管理、决策和控制的依据”的作用。因此必须重新审视开发环节,去除臃肿累赘,轻装上阵。

    一、XP的核心思想

          从长远看,早期发现错误以及降低复杂度可以节约成本。极限编程强调我们将任务/系统细分为可以在较短周期解决的一个个子任务/模块,并且强调测试、代码质量和及早发现问题。通常,通过一个个短小的迭代周期,我们就可以获得一个个阶段性的进展,并且可以及时形成一个版本供用户参考,以便及时对用户可能的需求变更作出响应。

    二、XP的十二种方法

          规划策略(The Planning Game);
          结对编程(Pair programming)
          测试(Testing)
          重构(Refractoring)
          简单设计(Simple Design)
          代码集体所有权(Collective Code Ownership)
          持续集成(Continuous Integration)
          现场客户(On-site Customer)
          小型发布(Small Release)
          每周40小时工作制(40-hour Week)
          编码规范(Code Standards)
          系统隐喻(System Metaphor)

    三、XP的四个核心价值

          极限编程中有四个核心价值是我们在开发中必须注意的:沟通(Communication)、简单(Simplicity)、反馈(Feedback)和勇气(Courage)。

      XP用“沟通、简单、反馈和勇气”来减轻开发压力和包袱;无论是术语命名、专著叙述内容和方式、过程要求,都可以从中感受到轻松愉快和主动奋发的态度和气氛。这是一种帮助理解和更容易激发人的潜力的手段。XP用自己的实践,在一定范围内成功地打破了软件工程“必须重量”才能成功的传统观念。

      XP精神可以启发我们如何学习和对待快速变化、多样的开发技术。成功学习XP的关键,是用“沟通、简单、反馈和勇气”的态度来对待XP;轻松愉快地来感受XP的实践思想;自己认真实践后,通过对真实反馈的分析,来决定XP对自己的价值;有勇气接受它,或改进它。

    四、XP 带给我们的变化

      通过软件工程设计的简单而优美的软件并不比那些设计复杂而难以维护的软件有价值。这是真的吗?XP认为事实并非如此。

      一个典型的项目花在人力上的金钱是花在硬件上的时间的20 倍,这意味着一个项目每年要花200 万美元在程序员身上,而仅仅花10 万美元在电脑设备上。很多聪明的程序员说:“我们如此聪明,发现一种方法可以节省20%的硬件开销”,然后他们使得源程序大而且难懂和难以维护,他们会说:“但是我们节省了20%或者2 万美元每年,很大的节省”。反之,如果我们写我们的程序简单而且容易扩展,我们将至少节省10%的人力开销,一笔更大的节省,这是你客户一定会注意到的一些事情。

      另外一个对客户来说很重要的问题就是程序的BUGS 。XP 不只是强调测试,而且要求正确的测试。测试必须是能自动进行的,以便为程序和客户提供一个安全的环境。在编码的所有阶段,我们不断增加测试用例。当找到bug 时,我们就添加新的测试,一个紧密的安全网就这样产生了。同一个BUG 不出现两次,这些一定会引起用户的注意。你的客户必须注意的另外一件事情:XP 开发者拥抱需求变化。XP 使我们能够接受需求的变化。

      一般情况下,客户只有在系统被开发完成以后能真正去体会它。XP 却不一样,它通过加强客户的反馈来缩短开发的周期,同时获得足够的时间来改变功能和获得用户的认同。在XP 中,你的客户应该明确的知道这一点。

      XP开发过程的大多的革命是在软件开发的方法上,代码质量的重要程度超出人们一般所认为的。仅仅因为我们的客户不能明白我们的源代码并不意味着我们可以不努力去管理代码的质量。

    五、我们什么时候用XP

      XP方法的产生是因为难以管理的需求变化,从一开始你的客户并不是很完全的知道他们要的系统是怎么样的,你可能面对的系统的功能一个月变化多次。在大多数软件开发环境中不断变化的需求是唯一的不变,这个时候应用XP 就可以取得别的方法不可能取得的成功。XP 方法的建立同时也是为了解决软件开发项目中的风险问题。假如你的客户在特定的时间内,需要一个相当难开发的系统,而且对于你的项目组来说,这个系统是一个新的挑战(从来没有做过),那风险就更大了,如果这个系统对于整个软件行业来说都是新的挑战,那么它的风险就更大了,采用XP 将可以减少风险,增加成功的可能。

      XP方法是为小团体开发建立的,在2-10 个人之间。假如你的团体恰好合适,你就不需要用其他的软件工程方法了,就用XP ,但是要注意你不能将XP 方法应用于大团体的开发项目中。我们应该注意,在需求一惯呈动态变化或者高具有高风险的项目中,你就会发现XP 方法在小团体的开发中的作用要远远高于在大团体的开发。

      XP方法需要一个扩展的开发团体,XP 团体不仅仅包括开发者,经理、客户也是其中的一员,所有的工作一环扣一环,问问题,商讨方法和日程,增加功能测试,这些问题的解决不仅仅涉及到软件的开发者。

      另一个需要是可测试性,你必须能增加自动的单元测试和功能测试,然而在你进行这个需求的时候,你会发现有许多的问题很难测试,这需要充分发挥你的测试的经验和智慧,而且你有时还要改变你的设计以便它可以更容易的进行测试。记住:那儿有需求,那儿就应该有测试的方法。

      在XP方法的好处的清单上,最后一条是生产力。在同样的合作环境下,XP 项目都一致的表现出比使用其他方法高的多的生产力。但这从来不是XP 方法学的真正目标。XP 真实追求的目标是:在规定的时间生产出满足客户需要的软件。假如对于你的开发来说,这是很重要的方面,你就可以选择XP 了。

    六、极限编程的有效实践

    1、完整团队

          XP项目的所有参与者(开发人员、客户、测试人员等)一起工作在一个开放的场所中,他们是同一个团队的成员。这个场所的墙壁上随意悬挂着大幅的、显著的图表以及其他一些显示他们进度的东西。

    2、计划游戏

          计划是持续的、循序渐进的。每2周,开发人员就为下2周估算候选特性的成本,而客户则根据成本和商务价值来选择要实现的特性。

    3、客户测试

          作为选择每个所期望的特性的一部分,客户可以根据脚本语言来定义出自动验收测试来表明该特性可以工作。

    4、简单设计

          团队保持设计恰好和当前的系统功能相匹配。它通过了所有的测试,不包含任何重复,表达出了编写者想表达的所有东西,并且包含尽可能少的代码。

    5、结对编程

          所有的产品软件都是由两个程序员、并排坐在一起在同一台机器上构建的。

    6、测试驱动开发

          编写单元测试是一个验证行为,更是一个设计行为。同样,它更是一种编写文档的行为。编写单元测试避免了相当数量的反馈循环,尤其是功功能能验证方面的反馈循环。程序员以非常短的循环周期工作,他们先增加一个失败的测试,然后使之通过。

    7、改进设计

          随时利用重构方法改进已经腐化的代码,保持代码尽可能的干净、具有表达力。

    8、持续集成

          团队总是使系统完整地被集成。一个人拆入(Check in)后,其它所有人责任代码集成。

    9、集体代码所有权

          任何结对的程序员都可以在任何时候改进任何代码。没有程序员对任何一个特定的模块或技术单独负责,每个人都可以参与任何其它方面的开发。

    10、编码标准

          系统中所有的代码看起来就好像是被单独一人编写的。

    11、隐喻

          将整个系统联系在一起的全局视图;它是系统的未来影像,是它使得所有单独模块的位置和外观变得明显直观。如果模块的外观与整个隐喻不符,那么你就知道该模块是错误的。

    12、可持续的速度

          团队只有持久才有获胜的希望。他们以能够长期维持的速度努力工作,他们保存精力,他们把项目看作是马拉松长跑,而不是全速短跑。

     

  • 敏捷宣言

    2007-11-21 21:56:23

    敏捷宣言:

    个体和迭代,超越过程和工具
    工作的软件,超越完整的文档
      客户协作,超越合同谈判
      响应变更,超越履行计划

    敏捷原则:

    1. 优先级最高的是,通过早期和持续交付有价值的软件来满足客户。
    2. 欢迎变更需求,即使在开发的后期提出。敏捷过程为客户的竞争优势而控制变更。
    3. 以两周到两月为周期,频繁地交付可运行的软件,首推较短的时间定量。
    4. 在整个项目过程中,每一天开发人员都要和业务人员合作。
    5. 由个体推动项目的建设,为个体提供所需的环境,支持和信任。
    6. 在开发团队中或开发团队间传递信息的最为有效和高效的方法是面对面的交谈。
    7. 衡量进展的重要尺度是可运行的软件。
    8. 敏捷过程提介可持续的开发。
    9. 发起人,开发者和用户应该步调一致。
    10.不断地关注技术上优越的设计会提高敏捷性。
    11.简洁是最重要的,简洁就是尽量减少工作量的艺术。
    12.最佳的架构,需求和设计来自于自组织的团队。
    13.团队要定期反省如何使工作更有效,然后相应地调整行为。

     

  • 我只想说-----节日快乐

    2007-11-10 23:31:59

    节日快乐节日快乐节日快乐节日快乐节日快乐节日快乐节日快乐节日快乐节日快乐节日快乐节日快乐节日快乐节日快乐节日快乐节日快乐节日快乐节日快乐节日快乐节日快乐节日快乐节日快乐节日快乐节日快乐节日快乐节日快乐节日快乐节日快乐节日快乐节日快乐节日快乐节日快乐节日快乐节日快乐节日快乐节日快乐节日快乐节日快乐节日快乐节日快乐节日快乐节日快乐节日快乐节日快乐节日快乐节日快乐节日快乐节日快乐节日快乐节日快乐节日快乐节日快乐节日快乐节日快乐节日快乐节日快乐节日快乐节日快乐节日快乐节日快乐节日快乐节日快乐节日快乐节日快乐节日快乐节日快乐节日快乐节日快乐节日快乐节日快乐节日快乐节日快乐节日快乐节日快乐节日快乐
  • 希望,算是新的希望吧

    2007-11-09 11:32:41

    第一次在这里写东西,
    我的博客都是51,以前那个是51.com,现在这个,是51testing.com,
    有点相近哦...
    呵呵
    希望我以后能够多来这里,少去那里
    因为那里,只是记载了我的悲伤,忧愁,伤感,无奈,痛苦,愤怒,黯然...
    我都习惯写在那里,但希望以后能够少去去....
    不再以感情为主线
    不再,为感情而黯然...

    希望,能在这里,再找到自己
Open Toolbar