Eleven sins of silkymmer (I)

Source: Internet
Author: User
I have written some articles about the automation functions of popular testing software. For example, segue's silkperformer (now Borland), Mercury Interactive's quick test Professional (qtp), And segue's silkteset. Recently, many csdn bosses have recommended these tools. I think it is necessary to repeat the old words. After all, we have a better choice. So I have rewritten those articles and posted them here. Today we will talk about silkperformer. In the previous article, we talked about the requirements for automated testing tools for Web applications. Here we can look at how silkperformer contradicts those requirements. The script language of silkymmer is BDL and benchmarking Definition Language. This language is like a bunch of toys designed by amateur programmers 30 years ago. Every time I used BDL to write the test code, I wondered what I had done in my previous life, so that I was overwhelmed by BdL. I tried to find a piece of tofu and killed me. I also lamented that Xianglin was not so pitiful. At that time, my colleagues and I complained that the test was not a person? Why is the next programming language used? BDL is a dynamic language used for load testing. I don't understand. Where is BDL "dynamic? Is it an interpreted language? It provides a little bit of Dynamic Language features, so that we can easily write test cases? It supports dynamic types, which is advantageous for rapid development? Let's talk about it all night. Before the BDL code is executed, it must be compiled into a Bex file. BDL does not provide any features other than Pascal in 1970s, which is a common Dynamic Language Feature in NLP. BDL only supports static types similar to standard Pascal and inherits the faults of standard Pascal's type system. BDL has many other restrictions, making it extremely painful for testers who write BDL code. BDL has at least eleven defects, ranking in no particular order: § BDL does not support nested expressions. That is to say Foo (Bar ())No such writing method works. We must write x = bar (); Foo (X ). A ugly word. § BDL type rules are incredibly stupid. As mentioned above, BDL has the Pascal lineage before December 1980. Obviously, the BDL designer has not read Brian kernighan's famous article, why Pascal is not my favorite language, especially section 2.1. As a result, the most Sb type rule of the new century was unveiled: the array length is part of the array type! That is to say, Array [10] of stringAnd Array [5] of stringIs two different types. Even more funny, BDL does not provide type conversion between arrays. Therefore, we do not need to pass an array with a length of 5 to an array variable with a type of 10 elements. Of course, we can use other methods to solve this problem. However, this feature itself is an insult to our intelligence (not in the last century, but definitely in this century ). § The syntax of BDL is inconsistent. For example, when defining a function, the parameter list is separated by semicolons. When this function is used, the parameter list must use a comma. For example, we use Function Foo (A: Number; B: Number ),But when foo is called, it must be written Foo (A, B ).Let people vomit. Apart from being unable to write a qualified Parser for segue, I cannot figure out why this rule causes brain necrosis. § The error message of the BDL compiler is better than none. A lot of error messages are just one sentence, telling you that a syntax error exists in a line. It is more primitive than the first compiler I wrote. § BDL does not support static variables, but supports header files (BdH and benchmarking definition header ). That is to say, the global variable in a header file is the global scalar of all the code containing this header file. To avoid variable conflicts, we only need not to adopt unnecessary naming rules. Apparently, segue never thought about how to help users build large test libraries. § BDL does not support Composite data structures. Needless to say, we often use list, map, and other things. No struct! Horrible. Is it difficult to give a dictionary data structure? The programmer of segue made a strange structure called form. We can add and modify key-value pairs in a form. Therefore, the form number is similar to that of a Multi-Key Map. The problem is that all forms can only be declared as global variables. The functions used to operate form are also ugly. Now let's take a look at one of them: webformvalueget (). First, let's guess what this function does. How many parameters are there? If you are an ordinary person like me, most of you have guessed that this function is similar to map # Get (Object key) in Java and retrieved the corresponding value based on a given key. Right? Error! How can a Great segue tolerate such a simple function. Webformvalueget () has seven parameters! This function can be used to obtain a value, obtain a key, obtain a key-value pair, or perform corresponding operations based on the previous running history. The retrieved value is not returned, but is marked In. Obviously, this Sb function is provided by COM. Such a function cannot be implemented by BdL itself, which is a big joke. More exaggerated is that we have to tell the size of the value of this function before getting a value. As a programmer of segue, one day's resistance to the high cohesion principle is also a great wonder in the industry. Exhausted. Take a break first.

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.