简体   繁体   English

Android为什么要用意式浓缩咖啡进行测试

[英]Android why test with espresso

I came across this testing framework Espresso. 我遇到了这个测试框架Espresso。

On some job applications I see that they look for experience in espresso. 在某些工作申请中,我看到他们正在寻找浓缩咖啡方面的经验。

This got me wondering what it is. 这让我想知道它是什么。

I see espresso is a testing framework. 我看到espresso是一个测试框架。 I see how it works and it's fairly easy to learn. 我知道它是如何工作的,并且很容易学习。 But now is my question, why would I want to test it with espresso instead of a physical test ? 但是现在我的问题是,为什么我要用意式浓缩咖啡而不是物理测试来测试它?

Because I have seen a couple of videos of espresso and how it works, it got me wondering why I would use espresso instead of my own mobile device with my own hands. 因为我看了几段浓缩咖啡的视频及其工作原理,所以让我想知道为什么我要用浓缩咖啡代替自己的移动设备。

I did a lot of test just by hand, and I don't really see the difference between testing it by hand and testing it with espresso. 我只是手动进行了很多测试,但我看不出手动测试与使用意式浓缩咖啡进行测试之间的区别。 While physical testing requires no extra programming work, espresso does. 物理测试不需要额外的编程工作,而espresso则需要。 And in the mean time I wrote an espresso script, I already could've tested it by hand. 同时,我编写了一个意式浓缩咖啡脚本,我已经可以手动对其进行测试。

I can see the outcome of my physical tests just by looking at the result while espresso tells me if it's working fine or not. 我可以通过查看结果来查看身体测试的结果,而意式浓缩咖啡会告诉我它是否工作正常。 Why would people use espresso ? 人们为什么要使用意式浓缩咖啡?

Kind regards, 亲切的问候,

Alex 亚历克斯

You use Espresso because it saves you time and because human testing is error prone. 您使用Espresso是因为它可以节省您的时间,并且人工测试容易出错。

Think of a bigger app where you have to test the whole flow every time you do a small change that could break the app. 想想一个更大的应用程序,您在每次做可能会破坏应用程序的小改动时都必须测试整个流程。 You use espresso to build your tests and check if the app still works as expected after every push/commit. 您可以使用espresso构建测试,并在每次推送/提交后检查应用程序是否仍能按预期运行。

Example: think of a chat app in which you send different types of messages (audio, video, photo, text, location, gif). 例如:考虑一个聊天应用程序,您在其中发送不同类型的消息(音频,视频,照片,文本,位置,gif)。 Why send each type of message by hand and not automate it and make it faster? 为什么要手动发送每种类型的消息,而不是使其自动化并使其更快?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM