BEST代写-线上编程学术专家

Best代写-最专业靠谱代写IT | CS | 留学生作业 | 编程代写Java | Python |C/C++ | PHP | Matlab | Assignment Project Homework代写

软件工程代写|COMP3111: Software Engineering Unit Testing

软件工程代写|COMP3111: Software Engineering Unit Testing

本次中国香港代写是一个Junit软件测试的assignment代码代写

 

Learning Outcomes

  • Be able to write unit tests
  • Be able to generate and understand coverage reports

An example on how to conduct unit testing in Eclipse will be given, together with the related
reference links (Exercise 1 & 2). You are going to apply what you have learned to design and
implement appropriate unit tests for your team project (Lab Activity).

Exercise 1: Writing Unit Tests

1.1: 1. Clone the repo from https://github.com/namkiu2020/comp3111-testing.git into Eclipse IDE
(refers to Exercise 2 in “Lab 5: Extending the base code and teamwork at GitHub”)

1.2: Verify the content of the Main Program – “Library.java” (src/main/java/UnitTestDemo)

code demo 1

1.3: Verify the content of the JUnit Test Case – “LibraryTester.java” (src/test/java/UnitTestDemo)

Code Demo 21.6: Verify the content of “build.gradle”

code demo 3

1.7: Go to Gradle Tasks Tab; Click at “Refresh Tasks for All Projects”

1.8: Run the Gradle Task “test” under the category “verification”

1.9: Result of each test could either be pass or failure. The test report generated can be found under
the project workspace folder at: ‘build/reports/tests/test/index.html’

(sample report of 5 tests with 0 failure)
(sample report of 6 tests with 1 failure)

1.10: References

• Video: JUnit 4 and Eclipse: The Basics (36:20)
• JavaDoc: List of Assertion Methods
• FAQ on JUnit 4

bestdaixie

评论已关闭。