Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Automated Screenshots #40

Open
JoaquimLey opened this issue Apr 11, 2018 · 0 comments
Open

Automated Screenshots #40

JoaquimLey opened this issue Apr 11, 2018 · 0 comments

Comments

@JoaquimLey
Copy link
Owner

JoaquimLey commented Apr 11, 2018

Add a task for automated screenshots

Context

  • With this task, the PlayStore listing will be localized for each supported language/city

  • This can be a simple step of the CI pipeline Setup CI/CD server #19

References

Test class example:

@RunWith(AndroidJUnit4.class)
public class FirstScreenShootTest {

	@ClassRule
	public static final LocaleTestRule localeTestRule = new LocaleTestRule();

	@Rule
	public ActivityTestRule<SomeActivity> activityRule = new ActivityTestRule<>(SomeActivity.class);

	@BeforeClass
	public static void setupClass() {
		Screengrab.setDefaultScreenshotStrategy(new UiAutomatorScreenshotStrategy());
	}

	@AfterClass
	public static void tearDownClass() throws Exception {
                //		 Code executed after the last test method
	}


	@Before
	public void setup() {

	}

	@After
	public void tearDown() {

	}

	@Test
	public void testTakeScreenshot() {
		Screengrab.screenshot("file_name");

		onView(withId(R.id.fab)).perform(click());

		Screengrab.screenshot("after_click_screen_shot_file_name");
	}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant