Today, I’d like to leave a tip. I’ve implemented test cases using this article for over 3 years. It helped us to control test environment more stable and fast. XCUITest can set process arguments for Instrumentation. According to https://github.com/appium/appium-xcuitest-driver#desired-capabilities, you can set processArguments in capability and the test app can get the value via ProcessInfo.…More
Tag Archives: test
[Android]some mocking features work only on Android P+
One of my colleagues told me Mockk. The library is pure Kotlin mocking library. An interesting thing for me is Android instrumentation support. I had a question when I saw that why Android P was a limitation. Since it provide mocking feature for final classes / objects in instrumentation tests. I investigated a bit and…More
[Android]Use apkanalyzer to get apk data
It’s important to make configurations programmable to manage them codebase and enhance automation. Android has provided apkanalyzer to analyse test target apks easily. Before the command, we use aapt for example. But with the analyzer command, we can get apk related data from target release apks easily. https://developer.android.com/studio/command-line/apkanalyzer The below is a simple wrapper for…More
Read “A Practical Guide to Testing in DevOps”
A couple of weeks ago, I read A Practical Guide to Testing in DevOps The book explained and described DevOps x Testing with many references and keywords. you can see why people struggle to understand where testing fits in a model that doesn’t mention it at all. For me, testing fits at each and every…More
[Android]New release of ATSL and new feature of composer
Lately, I’ve been using composer to run instrumented tests in the Android world. ([Android]composer and swarmer) Today, I just found an interesting PR. => https://github.com/gojuno/composer/pull/138 The PR is emulating the behaviour like AndroidTestOrchestrator. As you know, the orchestrator has some limitations and it includes Parameterized tests aren’t currently supported. It is JUnit4’s feature. So, the…More
[Appium]Image comparison with Appium and other libraries
In general, we compare two images when we’d like to detect differences between them in visual. I believe OpenCV and ImageMagick are famous tools to achieve the purpose lately. But sometimes we faced building errors, for example. So, I’ve used a simple enough comparison tool. That is Kobold. The library uses blink-diff as a comparison…More
[Elixir]property based testing with stream_data
Elixir will bundle property-based testing in the core. http://elixir-lang.github.io/blog/2017/10/31/stream-data-property-based-testing-and-data-generation-for-elixir/ We can see the prototype for the library from https://github.com/whatyouhide/stream_data . The following lines are the example I applied the library before. https://github.com/KazuCocoa/http_proxy/pull/47/commits/11bf6ff5a763c97c3ec6c7bc4a1811de53a6d0c2 We can see more details from https://hexdocs.pm/stream_data/StreamData.html and you can see how flexible the methods. link [Erlang][Software Test]Property-based testing/QuickCheck Testing https://www.cs.tufts.edu/~nr/cs257/archive/john-hughes/quick.pdfMore
Watching FB’s Android at Scale
I watched FB’s Android at Scale: https://code.facebook.com/posts/1958159731104103/android-scale-2018-recap/ I put my memo which I got interested in. Automated Testing Practices @ Scale: Waseem Ahmad, Facebook I know almost tips and same thought. Facebook have 10~15 UI changes a day So, they run UI related test hourly Bisect changes to commit and notify another UI testing things…More
“初めての自動テスト”は様々な人に手にとって読んでほしいものだった
9月21日に発売された”初めての自動テスト ―Webシステムのための自動テスト基礎”を恵贈いただいたことと、少しレビューさせて頂きましたので合わせてこの書籍に関して書こうと思います。(以下、本書) この本は元々、The Pragmatic Bookshelfでβ販売から開始されたThe Way Of The Web Testerが玉川さんによって翻訳されたものです。この書籍の著者は、アジャイルサムライを書かれたJonathan Rasmussonさん。 私はβ配信の頃にこの書籍を見つけ、過去、このBlogにおいても簡単な感想を書きました。その頃から少し後半が更新、少し内容が追加され、2017年6月29日に最新版が配布されました。本書はその最新版を翻訳したものですので、その内容は最新のThe Way Of The Web Testerと同等のものとなっています! 私は、玉川さんととある活動で知り合っていたこともあり、本書の翻訳レビューと主にはRubyコードに関わるところで相談させていただきました。また、過去にこの書籍の原書を読んで内容の素晴らしさを感じていたので、レビューの相談を頂いたさいも良い意味でとても驚きました。レビュー時から感じていたのですが、この翻訳版である本書の表現などの素晴らしさは玉川さんのご尽力のおかげです。とても良い仕上がりになっているかと思います。 本書に軽く触れる前に、私がこの書籍で好きなところを残しておきます。本書は、開発プロセスなどのテストに関わる周辺環境をなるべく剥がし、テストやそのコードに関わるところの足場に注力しているところです。一方で、ただ単にテストコードの話だけに止めるのではなく、そこに至るまでの話を チーム を中心にしているところが気に入っています。そのため、英語版、日本語版共に、これからテストに入門する人、経験の少ない人、経験の深い人各々に、それぞれの良さをつけてオススメしたいと思っています。 ここで少し話を脱線すると、本書に書かれているレガシーコードに対するUIテストの導入話や、テストピラミッドの話は、少し前にtry!Swiftにてお話させて頂きました内容と同じようなことも言っています。そのため、本書はWebと題しながらも、モバイルなどにも汎用的に使える考え方も多いことを感じるでしょう。 では、少し本書に触れます。 チームの人に 第1章、第8章は概念、実際にテストを導入するときに気にしないといけないところを中心に書いています。そのため、広くチーム全員にオススメします。この箇所で共通認識を持っていると、導入するテストの全体像に対する共通認識を説得する手間が省けるとおもます。読書会みたいな感じで話し合うのも良いかもしれません。また、ここではプロダクトに対するテストの全体像、どんなテストを、どのくらいの量、自動化すると有用かということを知るもとができます。 コード書く経験があまりない人に/手動テストが主な人に 8章までは基礎的なことが書かれているため、そこでテストコードの実装含め、基礎を学ぶことができます。実際にコード書きながら様々なユニットテストを学んだり、Webアプリの仕組みを大まかに学ぶことがでるためです。ここを学ぶと、発展的な内容を学ぶ土台となる知識が得られ、プログラミングが関わるような勉強会でもある程度話が想像できるようになると思います。 9章以降ではもう少しちゃんとプログラミングに触れたり、より良いテストコードの書き方、テストファーストの考え方まで学ぶことができます。本書にも書いてますが、本書をざっと学び、コードを書きながら経験を積んだ後には、よりテストコードを書き、よりコードを書く経験を増やし、他の書籍などを読みながら自分の力で自動テスト関係やその周辺環境の経験を増やしていけるでしょう。 本書を読み終えたら プログラミング言語でいうとここではRubyを題材にしていますが、モバイルに足を踏み入れるとJavaやKotlin、Objective-CやSwiftに触れる必要が出てくるでしょう。また、Webでも他の言語を学ぶことができます。言語におけるテストコードの文化や書きやすさの違い、プラットフォームによるテストし易さの違いを学びながら、より発展的なエンジニアとしての道を歩むことができるでしょう。 よりテスト技術に関して学びたい場合は、テスト技法関連の書籍を追ったり、GitHubなど含めてモックライブラリなどのライブラリを追うと良いでしょう。様々な、それぞれ使用感の異なる多様なライブラリに出会い、それぞれの良し悪しを学んだりできるかと思います。 また、ここの学んだことをベースに、アジャイルテスターのような方面に足を踏み入れることも挑戦的で面白いかと思います。開発プロセスなどが絡む方面に進むこともまた面白いかもしれません。 いずれにせよ、本書は様々な経験をする足場を学ぶことができるので、ぜひ手を取ってみていただければと思います。More
[Android]Run orchestrator 1.0.0
Download apks from maven: orchestrator-1.0.0.apk test-services-1.0.0.apk And install them and start the process like https://developer.android.com/training/testing/junit-runner.html If you have a custom runner, you can replace android.support.test.runner.AndroidJUnitRunner to yours. After the above, you can start instrumentation tests via the orchestration layer.More