2013年9月21日星期六

android project files do not have a main function

Andrews wrote in the development of tools, written in java file directly tested and found not the main method runs , each run also generates a log file , but to rebuild a java project to the inside of the test . Solving any good way to do
------ Solution -------------------------------- ------------
seemingly no good way . I am also a new java project , in which the test , with the same lz seek solutions to this problem
------ Solution --------------------- -----------------------
direct discharge activity in the test chant
------ Solution -------- ------------------------------------
not understand , why would go inside to the main test it ?
Since it is a utility class , then in your android project where to find the entrance , go call your method to test it.
------ Solution ---------------------------------------- ----
Android the above is an integrated unit testing , and I hope to help you
http://blog.csdn.net/tibib/article/details/6993608
------ eference --------------------------------------- < br>
amount will not, seek expert
------ eference ------------------------- --------------

For example, I wrote a string helper class , you need to use in the activity , after the write down the results I wanted to test , but they could not pass in this class file, add the main method to test
------ eference ------------------------------ ---------

I mean that it is a separate java class , it's useless to Andrews package , do not reinstall Andrews each virtual machine to run it again to see , but with the java project under way as a separate measure the output is correct.
------ eference --------------------------------------- < br> forehead , nobody encountered this situation ?
------ eference --------------------------------------- < br>


no android package ? I did not write your java class in android project in ?
------ eference --------------------------------------- < br> Since useless android class , then you can build another a java project , written inside the main test is not finished .
------ eference --------------------------------------- < br> can directly create a project specifically for the Android test project ! You can specify test methods !
------ eference --------------------------------------- < br> New - "project-" Android Project-"android test project
------ eference ----------------- ----------------------


Why must main to test it ? - Call the method in activity on it.
tested in many ways, upstairs provides Unit 4 test is also available.

want to test debugging , as long as the program can enter into this method is OK, means to see their habits
------ eference -------------- -------------------------
  The reply deleted by an administrator at 2012-11-30 08:42:16

------ eference ------------------------------------ ---


+1
------ eference ---------------------------------- -----
why not AndroidTestCase? What the main function
------ eference ------------------------------------ ---

never used
------ eference --------------------------- ------------

If the activity test, each had to re- compile and install into the virtual machine. I want to do is to write java program when it was like , write directly to the main function of the output after running facie correct
------ eference --------------- ------------------------
write a test class inherits ActivityInstrumentationTestCase2
can watch http://www.51testing.com/html/71/n-197671-3.html
------ eference ------------- --------------------------
I want . This class how to test slightly. . . As for why the main say in tests miss stoned him. You Tube these people there is definitely a need and others in this way ask Zuifan Asker

没有评论:

发表评论