In order to improve the efficiency of embedded software unit testing, and achieve good testing result in the meantime. It has practical significance to make adequacy criteria and strategy of unit testing and use automatic unit testing tool to accomplish unit testing. Take the buoyancy adjusting software for example, by studying the adequacy criteria of unit testing based on control flow and unit testing requirement of the buoyancy adjusting software, the unit testing adequacy criteria of buoyancy adjusting software has been put forward. Meanwhile, considering the influence of cyclomatic complexity and knots on realizing functions correctly, the unit testing strategy based on priority has been made. The dynamic testing environment is established by Testbed, which is an automatic unit testing tool. By analyzing code coverage, Testbed helped to create test cases to meet the adequacy criteria requirements, thereby realized the automatic unit testing of the buoyancy adjusting software. With the help of automatic unit testing tool, adequacy criteria and strategy of unit testing, rigorous and efficient unit testing has been accomplished in the end.