add test for background analyze
Merge branch 'master' into analyze_bug
Improve analyze test to include background analyze testing.