testng-eclipse icon indicating copy to clipboard operation
testng-eclipse copied to clipboard

Wrong progress status

Open grigory-mischenko opened this issue 11 years ago • 2 comments

When I am running tests The progress show wrong progress: if test has 7 test method, after executing 3rd test line will be filled on 100%. I looked the sources and found:

  • ProgressBar show progress based on count executed methods and m_maxTickCount
  • m_maxTickCount is set in method setMaximum(int max, int totalMethods) - first parameter "max"
  • the method setMaximum is invoked in TestRunnerViewPart: int newMaxBar = currentSuiteRunInfo.getNewMax(); fProgressBar.setMaximum(newMaxBar, currentSuiteRunInfo.getMethodTotalCount());
  • getNewMax method has logic: (m_methodTotalCount * m_testsTotalCount) / (m_testCount + 1)

I think the problem is here and I thing this expression has the next values:1*7/(1+1) = 3

Why in ProgressBar do not show progress based on count executed methods and total count of method? Also from progress message total number of methods was removed? Why? It is good to see how many method from total where executed.

grigory-mischenko avatar Dec 01 '14 16:12 grigory-mischenko

Why in ProgressBar do not show progress based on count executed methods and total count of method? Also from progress message total number of methods was removed? Why? It is good to see how many method from total where executed.

i think it's because m_methodTotalCount is not accurate enough, which means we can't know the exact total number for constructing the processBar.

but yes, the logic of the progress calculation need to be re-think and hopefully refactor with a more understandable manner.

missedone avatar Jul 24 '16 14:07 missedone

maybe similiar issue: https://github.com/cbeust/testng/issues/794

missedone avatar Oct 02 '17 16:10 missedone