Why Log.d() print nothing when running Android Local Unit Test?
<p>I'm trying to print something when running <strong>Android Local Unit Test</strong>, but nothing's happening. What's the matter? How can I fix it?</p>

<p>I consulted some documents on <a href="http://developer.android.com" rel="noreferrer">http://developer.android.com</a>, found that Android Local Unit Test just run on my machine's JVM, the android.jar file that is used to run unit tests does not contain any actual code, so Log.d() print nothing. If i wanna print log, how can i do?</p>

<p>Here is my code, <strong>FeedbackModelTest.java</strong> located in <strong><em>src/test/main</em></strong> directory.</p>

<pre><code>package com.upward.reader.mvp.model;

import android.util.Log;

import com.upward.reader.mvp.bean.FeedbackBean;
import com.upward.reader.net.RequestJSONCallback;

import org.junit.Test;

import java.io.IOException;
import java.util.HashMap;
import java.util.Map;

public class FeedbackModelTest {

@Test
public void postFeedback() throws Exception {
    final String url = "http://test.guguread.com/interface/app/user/feedback?";
    Map&lt;String, String&gt; params = new HashMap&lt;&gt;();
    params.put("content", "content");
    new FeedbackModel().postFeedback(url, params, new RequestJSONCallback&lt;FeedbackBean&gt;() {

        @Override
        public void onResponse(FeedbackBean result) throws IOException {
            Log.d("TAG", result.toString());
        }

        @Override
        public void onFailure(Exception e) {
            e.printStackTrace();
        }

    });
}
</code></pre>

<p>}</p>