google / google/EarlGrey

GreyAsserts don't highlight the lines where the tests fail

Open
#659 4 comments 0 reactions 0 assignees View on GitHub
Dominant language
Objective-C
Stars
5.7k
Forks
737
Avg merge
1d 20h
Merged PRs (30d)
5

Description

I just started to use EarlGrey in my UI tests, and I mentioned that GreyAsserts do not highlight the lines in files where they were activated:
![image](https://user-images.githubusercontent.com/26448344/32593387-c05ca15a-c538-11e7-8b26-ca88bbbae317.png)

No error message, no highlighted line, where the test failed, but if we jump to definition of GREYAssert, we'll find it:
![image](https://user-images.githubusercontent.com/26448344/32593622-a454934a-c539-11e7-9faf-6cd1decd8858.png)

I suppose that it should work the same way as XCTAssert does:
![image](https://user-images.githubusercontent.com/26448344/32593950-1a75811e-c53b-11e7-87af-c550ed884a3b.png)

So the error will be shown right in place where it happened in test-file, which is easy to trace, and the CI reports will show the correct position and message.

Is that the issue of EarlGrey, or I just do something wrong?

P.S. EarlGrey 1.4.0.beta.2

Contributor guide

Open the contributing guide

Research direction

Start by locating GREYAssert and comparing its failure reporting with the XCTest XCTAssert behavior shown in the issue. Reproduce a failing EarlGrey UI test using the reported 1.4.0.beta.2 context; done means the failure highlights the originating test line and CI reports the correct position and message.

Written by the indexing model from the issue text.

Assessment

Tech stack
objective-c
Domain
mobile, testing
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.