mirror of
				https://github.com/mik3y/usb-serial-for-android
				synced 2025-10-30 18:07:21 +00:00 
			
		
		
		
	Updated Device Tests & Coverage Report (markdown)
							parent
							
								
									e7b3257362
								
							
						
					
					
						commit
						3ac8fbaa61
					
				| @ -62,17 +62,19 @@ Note: with enabled ``testCoverageEnabled true`` the test fails or creates an emp | |||||||
| Enable ``testCoverageEnabled true`` and for each **device** *flavor* defined in ``coverage.gradle`` execute the corresponding gradle task   | Enable ``testCoverageEnabled true`` and for each **device** *flavor* defined in ``coverage.gradle`` execute the corresponding gradle task   | ||||||
| *usb-serial-for-android -> usbSerialForAndroid -> verification -> create***Device***DebugCoverageReport* or   | *usb-serial-for-android -> usbSerialForAndroid -> verification -> create***Device***DebugCoverageReport* or   | ||||||
| *usb-serial-for-android -> usbSerialForAndroid -> other -> create***Device***DebugAndroidTestCoverageReport*.   | *usb-serial-for-android -> usbSerialForAndroid -> other -> create***Device***DebugAndroidTestCoverageReport*.   | ||||||
| Both tasks create the required __*.ec__ report files but html reports do not contain annotated source code. | Both tasks create the required __*.ec__ and __*.xml__ report files but html reports do not contain annotated source code. | ||||||
| 
 | 
 | ||||||
| Test reports are created even if tests fail. Nevertheless you should check that it didn't fail completely. | Test reports are created even if tests fail. Nevertheless you should check that it didn't fail completely. | ||||||
| 
 | 
 | ||||||
| ## Local coverage report | ## Create coverage report | ||||||
| 
 | 
 | ||||||
| With gradle task *usb-serial-for-android -> usbSerialForAndroid -> other -> jacocoTestReport* you can create a summary report that also includes annotated source code. | Create summary __*.xml__ report with gradle task *usb-serial-for-android -> usbSerialForAndroid -> other -> jacocoTestReport*. This also creates a local __*.html__ report with annotated source code. | ||||||
| 
 | 
 | ||||||
| ## Upload coverage report | ## Upload coverage report | ||||||
| 
 | 
 | ||||||
| Upload coverage reports to [codecov.io](https://codecov.io/gh/mik3y/usb-serial-for-android) using the bash uploader. On Windows execute in ``Git Bash`` | Upload coverage reports to [codecov.io](https://codecov.io/gh/mik3y/usb-serial-for-android) using the bash uploader. On Windows execute in ``Git Bash``, e.g. | ||||||
| 
 | 
 | ||||||
|  |     cd /c/work/AndroidStudioProjects/usb-serial-for-android | ||||||
|  |     ../codecov.sh -t <token> -f usbSerialForAndroid/build/reports/jacoco/jacocoTestReport/jacocoTestReport.xml | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user