1 Problem descriptionIn a dialog box, the user enters a set of strings that need to satisfy a length of 1 to 6 and need to be made up of 0-9,a-z, or A-Z, and other use cases are illegal.2 Equivalence class Partitioning
Valid equivalence classes
Number
Invalid equivalence class
Number
Number of characters
1-6
1
0
4
2
7
5
Character type
1. You can also move the DRIVE_ONE_PKT in the driver to Pre_tran. Further, it is also possible to move Seq_item_port.get_next_item to Pre_tran.2. In fact, all the test cases can be implemented without sequence, only with callback. Suppose Class A is as follows:3. In My_driver main_phase, remove all other code and call a run only:4. To create a new test case, you
Skip the test phase:
MVN package-dskiptests
Temporarily skip the compilation of the test code:
MVN package-dmaven.test.skip=true
Maven.test.skip also controls the behavior of the Maven-compiler-plugin and maven-surefire-plugin two plug-ins, skipping compilation and skipping tests.
Specifying Test classes
MVN test
The springboot comes with a test module.Annotations require:@SpringApplicationConfiguration (classes = computeserviceapplication. Class)This allows the environment context to be introduced.The complete notes are as follows:@RunWith (Springjunit4classrunner. Class= computeserviceapplication. class ) @WebAppConfiguration@BeforeInitializing an MOCKMVC instance Public void throws Exception { = mockmvcbuilders.webappcontextsetup (WAC). build ();
The cyclic structure has many applications in software programs, but the testing cases of the cyclic structure are relatively special. The white box testing method alone does not work. The conditional coverage method and path coverage method must be used, only when the equivalence classes in the black box testing method are divided and the boundary value analysis is combined can the problem be solved.
1. Single-Cycle Structure
Zero execution cycle
No.
Test Cases
Actual results
Expected results
Test results (pass/failed)
Note
1
Enter a username and password with only numbers or letters, click Register
Registration successful
Registration successful
Pass
/
2
Enter a user name or password with a special symbol, click Register
No.
Test Cases
Actual results
Expected results
Test resultsPass/failed
Note
1.
Content: Open app,3 seconds to enter the Welcome pageStep: Open app,3 seconds after entering the Welcome screen
Enter the Welcome screen in 3 seconds
Enter the Welcome screen in 3 seconds
Pass
/
2.
Conte
Hibernate learning: CRUD unit test cases + knowledge Summary
I. Use Cases
Ii. Summary
Main interfaces:1: AnnotationConfiguration2: SessionFactory3: SessionKnowledge point:1: configure can specify the path of the Hibernate file. If the Hibernate configuration file name is hibernate. cfg. xml, you do not need to write the file path.2: factory. openSessio
collect to improve Oracle query efficiency
The bulk collect feature is introduced in Oracle8i for the first time. This feature allows you to use batch queries in PL/SQL. Batch queries can significantly improve query efficiency in some cases. Now, we will perform some simple tests and analysis on this feature.
1. First, create a table and insert 100000 records.Execute the following script in SQL/plus:
Drop table empl_tbl/Create Table empl_tbl (last_na
Test method: Right-bicepTest Plan1.right-is the result correct?2.b-are all the boundary conditions correct?Does the 3.p-meet performance requirements?4. Is there a multiplication method?5. Do you have parentheses?6. Do you have a real score?7. Can I select a number size range?8. Can I choose the number of the quiz?Test results1. The results of the program are correct2. Meet all boundary conditions3. Perform
see the automatic installation, landing knowPassed:login===============================================Default TestTests Run:1, failures:0, skips:0==============================================================================================Default SuiteTotal tests Run:1, failures:0, skips:0===============================================[TestNG] Time taken by [email protected]: 1938 MS[TestNG] Time taken by [email protected]: 121 ms[TestNG] Time taken by [Failedreporter passed=0 failed=0 Skippe
Test case writing is not easy, write a professional test case, is the content that all testers consider, in fact the writing of use cases can be done by some ideas, many mature companies in order to enhance the professional use case, there will be their own use case library, including processes, concerns, as well as their own definition of templates. Today as a
Test method: Right-bicepTest Plan1.right-is the result correct?2.b-are all the boundary conditions correct?Does the 3.p-meet performance requirements?4. Are there 20 questions that meet the requirements of the results?5. The maximum number of the obtained is not more than 996. Whether the multiplication law is included7. Is the multiplication method consistent with the divisible8. Is there a negative result of the addition or subtraction?
Here only the code implementation, the specific principles and procedures please see the previous blog postNote: This Test notebooks machine test passed, but I do not know why the OJ always appear in the run-time error prompts, there are big God see the problem please advise ~ ~The test file input format is as follows:2 10 0.01 102104 3 3999001600 3 3299002400 3
This example describes the Python Automation test run test Cases from the command line with verbosity, to share with you for your reference. Specifically as follows:
The instance file recipe3.py is as follows:
Class Romannumeralconverter (object):
def __init__ (self, roman_numeral):
self.roman_numeral = roman_numeral
Self.digit_map = {"M": 1
One: Use CasesTwo: summaryMain interface:1:annotationconfiguration2:sessionfactory3:sessionKnowledge Points:1:configure can specify the path to the hibernate file, if the Hibernate profile name is Hibernate.cfg.xml, then you do not have to write the file path2:factory.opensession (); each time a call is made, a new session will be created3:factory.getcurrentsession (); Gets the session from the context, if one is not created, creates a new session if not4:factory.opensession (); manual close Req
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.