{"id":48249,"date":"2017-06-30T15:00:45","date_gmt":"2017-06-30T12:00:45","guid":{"rendered":"http:\/\/examples.javacodegeeks.com\/?p=48249"},"modified":"2019-03-20T13:48:11","modified_gmt":"2019-03-20T11:48:11","slug":"junit-no-runnable-methods","status":"publish","type":"post","link":"https:\/\/examples.javacodegeeks.com\/java-development\/core-java\/junit\/junit-no-runnable-methods\/","title":{"rendered":"JUnit No Runnable Methods"},"content":{"rendered":"<p>In this tutorial, we shall show users the usage of JUnit and explains the reason behind the No Runnable Methods error. We live in a fast age of technology where the everyday new breakthrough is going on. We have to be updated with the latest technologies around us and how they affect our lives.<\/p>\n<p>We have seen in our previous tutorial about the <a href=\"https:\/\/examples.javacodegeeks.com\/core-java\/junit\/junit-run-tests-in-parallel\/\" target=\"_blank\" rel=\"noopener noreferrer\"><strong>running parallel tests in JUnit<\/strong><\/a> and how we can run our tests in parallel so that we can use the multi-core functionality of the latest CPU&#8217;s.<\/p>\n<p>Similarly, with the enhancements in the JUnit framework, we have seen a lot of different situations where we have to do nothing and everything is handled by JUnit itself. In this tutorial, we will see how we can get rid of the no runnable method error.\n<\/p>\n<h2>1. Introduction<\/h2>\n<p>JUnit no runnable methods error arises when we do not specify any method for testing. Previous versions of the JUnit uses the <code>testXXX()<\/code> style of naming methods. So whenever JUnit runs it will see the methods starting with test. It will run all methods present in the class.<\/p>\n<p>But as the JUnit advances to the next level it defines its new way of finding the test methods in a class. Today JUnit uses <code>@Test<\/code> annotation. We simply apply that annotation on a method and JUnit runs it. There will be no boundation of naming the methods starting with test.<\/p>\n<p><code>@Test<\/code> annotation plays a vital role running our test cases. We have used <code>@Test<\/code> annotation in our example to show this.<\/p>\n<h2>2. Technologies Used<\/h2>\n<p>We will be using the following technologies in our example.<\/p>\n<ul>\n<li><strong>Java 8<\/strong> &#8211; We will be using the latest version of Java. There is no specific feature of Java 1.8 that has been used.<\/li>\n<li><strong>JUnit 4.12<\/strong> &#8211; This is the main testing framework that we will be using.<\/li>\n<li><strong>Maven<\/strong> &#8211; This is the build and dependency tool for this example.<\/li>\n<li><strong>Eclipse<\/strong> &#8211; IDE for writing the code.<\/li>\n<\/ul>\n<p>For links to the latest versions and their websites visit the <a href=\"#references\">references<\/a> section of the tutorial. Now, we have defined the technologies to be used. Let\u2019s start the setup of our example.<\/p>\n<h2>3. Project Setup<\/h2>\n<div class=\"tip\"><strong>Tip<\/strong><br \/>\nYou may skip project creation and jump directly to the <a href=\"#code\"><strong>beginning of the example<\/strong><\/a> below.<\/div>\n<p>Start by opening eclipse. Click on <strong>File -&gt; New -&gt; Maven Project<\/strong>. You will be shown the following screen.<\/p>\n<p>Simply check the first check mark and click on the <strong>Next<\/strong> button.<div style=\"display:inline-block; margin: 15px 0;\"> <div id=\"adngin-JavaCodeGeeks_incontent_video-0\" style=\"display:inline-block;\"><\/div> <\/div><\/p>\n<p><figure id=\"attachment_48250\" aria-describedby=\"caption-attachment-48250\" style=\"width: 725px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2017\/06\/junit_norunnable_methods_setup_1.jpg\"><img decoding=\"async\" class=\"size-full wp-image-48250\" src=\"http:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2017\/06\/junit_norunnable_methods_setup_1.jpg\" alt=\"JUnit No Runnable Methods Setup 1\" width=\"725\" height=\"503\" srcset=\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2017\/06\/junit_norunnable_methods_setup_1.jpg 725w, https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2017\/06\/junit_norunnable_methods_setup_1-300x208.jpg 300w\" sizes=\"(max-width: 725px) 100vw, 725px\" \/><\/a><figcaption id=\"caption-attachment-48250\" class=\"wp-caption-text\">Figure 1: JUnit No Runnable Methods Setup 1<\/figcaption><\/figure><\/p>\n<p>On this screen, you need to fill in the details regarding the project we are building. You can simply fill in the following details as shown and click on the <strong>Finish<\/strong> button.<\/p>\n<p><figure id=\"attachment_48251\" aria-describedby=\"caption-attachment-48251\" style=\"width: 716px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2017\/06\/junit_norunnable_methods_setup_2.jpg\"><img decoding=\"async\" class=\"size-full wp-image-48251\" src=\"http:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2017\/06\/junit_norunnable_methods_setup_2.jpg\" alt=\"JUnit No Runnable Methods Setup 2\" width=\"716\" height=\"658\" srcset=\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2017\/06\/junit_norunnable_methods_setup_2.jpg 716w, https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2017\/06\/junit_norunnable_methods_setup_2-300x276.jpg 300w\" sizes=\"(max-width: 716px) 100vw, 716px\" \/><\/a><figcaption id=\"caption-attachment-48251\" class=\"wp-caption-text\">Figure 2: JUnit No Runnable Methods Setup 2<\/figcaption><\/figure><\/p>\n<p>After clicking on the Finish button, we are ready with the blank Maven project. But before we start with the code, we need to do some changes in the <code>pom.xml<\/code> file.<br \/>\n<span id=\"code\"><\/span><br \/>\n<span style=\"text-decoration: underline;\"><em>pom.xml<\/em><\/span><\/p>\n<pre class=\"brush:xml;wrap-lines:false;highlight:[4,18,19]\"> \n...\n&lt;dependencies&gt;\n    &lt;dependency&gt;\n        &lt;groupId&gt;junit&lt;\/groupId&gt;\n        &lt;artifactId&gt;junit&lt;\/artifactId&gt;\n        &lt;version&gt;4.12&lt;\/version&gt;\n    &lt;\/dependency&gt;\n &lt;\/dependencies&gt;\n &lt;build&gt;\n     &lt;finalName&gt;junitnorunnable&lt;\/finalName&gt;\n     &lt;plugins&gt;\n         &lt;plugin&gt;\n             &lt;groupId&gt;org.apache.maven.plugins&lt;\/groupId&gt;\n             &lt;artifactId&gt;maven-compiler-plugin&lt;\/artifactId&gt;\n             &lt;version&gt;2.5.1&lt;\/version&gt;\n             &lt;inherited&gt;true&lt;\/inherited&gt;\n             &lt;configuration&gt;\n                 &lt;source&gt;1.8&lt;\/source&gt;\n                 &lt;target&gt;1.8&lt;\/target&gt;\n             &lt;\/configuration&gt;\n          &lt;\/plugin&gt;\n     &lt;\/plugins&gt;\n &lt;\/build&gt;\n...\n<\/pre>\n<p><strong>Line 4:<\/strong> actually pulls out the JUnit for this project.<br \/>\n<strong>Line 18,19:<\/strong> tells maven to compile and build with Java 8.<\/p>\n<h2>4. JUnit No Runnable Methods<\/h2>\n<p>First, we need to create a class where no <code>@Test<\/code> annotation is used. It is a simple class with a single method for testing. Since we are using the eclipse it will not run the class as a JUnit class because of the method with any <code>@Test<\/code> annotation.<br \/>\nSo, we will create another class with <code>Suite<\/code> runner. You can get the example of suite runner in references sections.[ulp id=&#8217;ODQaBEw1BIbHApZq&#8217;]<\/p>\n<p><span style=\"text-decoration: underline;\"><em>TestClass.java<\/em><\/span><\/p>\n<pre class=\"brush:java;wrap-lines:false\"> \npackage junitnorunnable;\n\npublic class TestClass {\n    \n    public void testA(){\n        System.out.println(\"Hello\");\n    }\n}\n<\/pre>\n<p>Next, we will create a <code>Suite<\/code> class.<\/p>\n<p><span style=\"text-decoration: underline;\"><em>TestSuite.java<\/em><\/span><\/p>\n<pre class=\"brush:java;wrap-lines:false\">package junitnorunnable;\n\nimport org.junit.runner.RunWith;\nimport org.junit.runners.Suite;\nimport org.junit.runners.Suite.SuiteClasses;\n\n@RunWith(Suite.class)\n@SuiteClasses({TestClass.class})\npublic class TestSuite {\n\n} \n<\/pre>\n<p>So, when you try to run this class you will get the error as shown below. Yes, definitely it is the same error that we are dealing with.<\/p>\n<p><figure id=\"attachment_48252\" aria-describedby=\"caption-attachment-48252\" style=\"width: 794px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2017\/06\/error_output.jpg\"><img decoding=\"async\" class=\"size-full wp-image-48252\" src=\"http:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2017\/06\/error_output.jpg\" alt=\"JUnit No Runnable Methods Error Output\" width=\"794\" height=\"259\" srcset=\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2017\/06\/error_output.jpg 794w, https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2017\/06\/error_output-300x98.jpg 300w, https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2017\/06\/error_output-768x251.jpg 768w\" sizes=\"(max-width: 794px) 100vw, 794px\" \/><\/a><figcaption id=\"caption-attachment-48252\" class=\"wp-caption-text\">Figure 3: JUnit No Runnable Methods Error Output<\/figcaption><\/figure><\/p>\n<p>Now, if we add the <code>@Test<\/code> annotation to our class, then test case will be passed.<\/p>\n<p><span style=\"text-decoration: underline;\"><em>TestClass.java<\/em><\/span><\/p>\n<pre class=\"brush:java;wrap-lines:false;highlight:[7]\"> \npackage junitnorunnable;\n\nimport org.junit.Test;\n\npublic class TestClass {\n    \n    @Test\n    public void testA(){\n        System.out.println(\"Hello\");\n    }\n}\n<\/pre>\n<p>Here we have added <code>@Test <\/code>annotation on our method (<strong>line 7<\/strong>). When we run the <code>TestSuite<\/code> class we will get the following output.<\/p>\n<p><figure id=\"attachment_48253\" aria-describedby=\"caption-attachment-48253\" style=\"width: 796px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2017\/06\/success_output.jpg\"><img decoding=\"async\" class=\"size-full wp-image-48253\" src=\"http:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2017\/06\/success_output.jpg\" alt=\"JUnit No Runnable Methods Success Output\" width=\"796\" height=\"241\" srcset=\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2017\/06\/success_output.jpg 796w, https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2017\/06\/success_output-300x91.jpg 300w, https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2017\/06\/success_output-768x233.jpg 768w\" sizes=\"(max-width: 796px) 100vw, 796px\" \/><\/a><figcaption id=\"caption-attachment-48253\" class=\"wp-caption-text\">Figure 4: JUnit No Runnable Methods Success Output<\/figcaption><\/figure><\/p>\n<p>You can see, that by applying the <code>@Test<\/code> annotation our error is resolved.<\/p>\n<h2>5. Conclusion<\/h2>\n<p><strong>JUnit no runnable methods is an error that is generated whenever JUnit finds no test methods to run.<\/strong> There is a simple way to deal with it. Either name the method starts with <strong>test<\/strong> or use the <code>@Test<\/code> annotation on the method.<\/p>\n<p>This clears why we get this error. And we had also seen the solution to this problem. References to some of the common libraries used can be seen <a href=\"#references\"><strong>below<\/strong><\/a>.<\/p>\n<h2>6. Download the Eclipse Project<\/h2>\n<p>This is an example of the JUnit no runnable methods.<\/p>\n<div class=\"download\"><strong>Download<\/strong><br \/>\nYou can download the full source code of this example here: <a href=\"http:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2017\/06\/junitnorunnable.zip\"><strong>JUnitNoRunnable.zip<\/strong><\/a><\/div>\n<h2><a name=\"references\"><\/a>7. References<\/h2>\n<ol>\n<li><a href=\"http:\/\/junit.org\/junit4\/\" target=\"_blank\" rel=\"nofollow noopener noreferrer\"><strong>JUnit 4.12<\/strong><\/a><\/li>\n<li><a href=\"http:\/\/maven.apache.org\/\" target=\"_blank\" rel=\"nofollow noopener noreferrer\"><strong>Maven<\/strong><\/a><\/li>\n<li><a href=\"https:\/\/examples.javacodegeeks.com\/core-java\/junit\/junit-group-tests-example\/\" target=\"_blank\" rel=\"noopener noreferrer\"><strong>Suite Runner Example<\/strong><\/a><\/li>\n<\/ol>\n","protected":false},"excerpt":{"rendered":"<p>In this tutorial, we shall show users the usage of JUnit and explains the reason behind the No Runnable Methods error. We live in a fast age of technology where the everyday new breakthrough is going on. We have to be updated with the latest technologies around us and how they affect our lives. We &hellip;<\/p>\n","protected":false},"author":112,"featured_media":6678,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[25],"tags":[1032],"class_list":["post-48249","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-junit","tag-junit"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>JUnit No Runnable Methods - Java Code Geeks<\/title>\n<meta name=\"description\" content=\"In this tutorial, we shall show users the usage of JUnit and explains the reason behind the JUnit No Runnable Methods error. We live in a fast age\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/examples.javacodegeeks.com\/java-development\/core-java\/junit\/junit-no-runnable-methods\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"JUnit No Runnable Methods - Java Code Geeks\" \/>\n<meta property=\"og:description\" content=\"In this tutorial, we shall show users the usage of JUnit and explains the reason behind the JUnit No Runnable Methods error. We live in a fast age\" \/>\n<meta property=\"og:url\" content=\"https:\/\/examples.javacodegeeks.com\/java-development\/core-java\/junit\/junit-no-runnable-methods\/\" \/>\n<meta property=\"og:site_name\" content=\"Examples Java Code Geeks\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/javacodegeeks\" \/>\n<meta property=\"article:published_time\" content=\"2017-06-30T12:00:45+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2019-03-20T11:48:11+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2013\/11\/junit-logo.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"150\" \/>\n\t<meta property=\"og:image:height\" content=\"150\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Vinod Kumar Kashyap\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@vinodkashyap\" \/>\n<meta name=\"twitter:site\" content=\"@javacodegeeks\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Vinod Kumar Kashyap\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/examples.javacodegeeks.com\/java-development\/core-java\/junit\/junit-no-runnable-methods\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/examples.javacodegeeks.com\/java-development\/core-java\/junit\/junit-no-runnable-methods\/\"},\"author\":{\"name\":\"Vinod Kumar Kashyap\",\"@id\":\"https:\/\/examples.javacodegeeks.com\/#\/schema\/person\/1d6281e8235e49b5b8614621c2445d2c\"},\"headline\":\"JUnit No Runnable Methods\",\"datePublished\":\"2017-06-30T12:00:45+00:00\",\"dateModified\":\"2019-03-20T11:48:11+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/examples.javacodegeeks.com\/java-development\/core-java\/junit\/junit-no-runnable-methods\/\"},\"wordCount\":808,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/examples.javacodegeeks.com\/#organization\"},\"image\":{\"@id\":\"https:\/\/examples.javacodegeeks.com\/java-development\/core-java\/junit\/junit-no-runnable-methods\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2013\/11\/junit-logo.jpg\",\"keywords\":[\"junit\"],\"articleSection\":[\"junit\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/examples.javacodegeeks.com\/java-development\/core-java\/junit\/junit-no-runnable-methods\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/examples.javacodegeeks.com\/java-development\/core-java\/junit\/junit-no-runnable-methods\/\",\"url\":\"https:\/\/examples.javacodegeeks.com\/java-development\/core-java\/junit\/junit-no-runnable-methods\/\",\"name\":\"JUnit No Runnable Methods - Java Code Geeks\",\"isPartOf\":{\"@id\":\"https:\/\/examples.javacodegeeks.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/examples.javacodegeeks.com\/java-development\/core-java\/junit\/junit-no-runnable-methods\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/examples.javacodegeeks.com\/java-development\/core-java\/junit\/junit-no-runnable-methods\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2013\/11\/junit-logo.jpg\",\"datePublished\":\"2017-06-30T12:00:45+00:00\",\"dateModified\":\"2019-03-20T11:48:11+00:00\",\"description\":\"In this tutorial, we shall show users the usage of JUnit and explains the reason behind the JUnit No Runnable Methods error. We live in a fast age\",\"breadcrumb\":{\"@id\":\"https:\/\/examples.javacodegeeks.com\/java-development\/core-java\/junit\/junit-no-runnable-methods\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/examples.javacodegeeks.com\/java-development\/core-java\/junit\/junit-no-runnable-methods\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/examples.javacodegeeks.com\/java-development\/core-java\/junit\/junit-no-runnable-methods\/#primaryimage\",\"url\":\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2013\/11\/junit-logo.jpg\",\"contentUrl\":\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2013\/11\/junit-logo.jpg\",\"width\":150,\"height\":150},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/examples.javacodegeeks.com\/java-development\/core-java\/junit\/junit-no-runnable-methods\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/examples.javacodegeeks.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Java Development\",\"item\":\"https:\/\/examples.javacodegeeks.com\/category\/java-development\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Core Java\",\"item\":\"https:\/\/examples.javacodegeeks.com\/category\/java-development\/core-java\/\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"junit\",\"item\":\"https:\/\/examples.javacodegeeks.com\/category\/java-development\/core-java\/junit\/\"},{\"@type\":\"ListItem\",\"position\":5,\"name\":\"JUnit No Runnable Methods\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/examples.javacodegeeks.com\/#website\",\"url\":\"https:\/\/examples.javacodegeeks.com\/\",\"name\":\"Java Code Geeks\",\"description\":\"Java Examples and Code Snippets\",\"publisher\":{\"@id\":\"https:\/\/examples.javacodegeeks.com\/#organization\"},\"alternateName\":\"JCG\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/examples.javacodegeeks.com\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/examples.javacodegeeks.com\/#organization\",\"name\":\"Exelixis Media P.C.\",\"url\":\"https:\/\/examples.javacodegeeks.com\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/examples.javacodegeeks.com\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png\",\"contentUrl\":\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png\",\"width\":864,\"height\":246,\"caption\":\"Exelixis Media P.C.\"},\"image\":{\"@id\":\"https:\/\/examples.javacodegeeks.com\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/javacodegeeks\",\"https:\/\/x.com\/javacodegeeks\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/examples.javacodegeeks.com\/#\/schema\/person\/1d6281e8235e49b5b8614621c2445d2c\",\"name\":\"Vinod Kumar Kashyap\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/examples.javacodegeeks.com\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/a11634ec460c849e8631b740af1b75cb68c9c58d5c2339c21bcd95f55b9af4f5?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/a11634ec460c849e8631b740af1b75cb68c9c58d5c2339c21bcd95f55b9af4f5?s=96&d=mm&r=g\",\"caption\":\"Vinod Kumar Kashyap\"},\"description\":\"Vinod is Sun Certified and love to work in Java and related technologies. Having more than 13 years of experience, he had developed software's including technologies like Java, Hibernate, Struts, Spring, HTML 5, jQuery, CSS, Web Services, MongoDB, AngularJS, AWS. He is also a JUG Leader of Chandigarh Java User Group.\",\"sameAs\":[\"http:\/\/www.vinodkashyap.com\/\",\"https:\/\/www.instagram.com\/vinodkashyap\/\",\"https:\/\/in.linkedin.com\/in\/vinodkashyap\",\"https:\/\/in.pinterest.com\/vinodkashyap\/\",\"https:\/\/x.com\/vinodkashyap\"],\"url\":\"https:\/\/examples.javacodegeeks.com\/author\/vinod-kashyap\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"JUnit No Runnable Methods - Java Code Geeks","description":"In this tutorial, we shall show users the usage of JUnit and explains the reason behind the JUnit No Runnable Methods error. We live in a fast age","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/examples.javacodegeeks.com\/java-development\/core-java\/junit\/junit-no-runnable-methods\/","og_locale":"en_US","og_type":"article","og_title":"JUnit No Runnable Methods - Java Code Geeks","og_description":"In this tutorial, we shall show users the usage of JUnit and explains the reason behind the JUnit No Runnable Methods error. We live in a fast age","og_url":"https:\/\/examples.javacodegeeks.com\/java-development\/core-java\/junit\/junit-no-runnable-methods\/","og_site_name":"Examples Java Code Geeks","article_publisher":"https:\/\/www.facebook.com\/javacodegeeks","article_published_time":"2017-06-30T12:00:45+00:00","article_modified_time":"2019-03-20T11:48:11+00:00","og_image":[{"width":150,"height":150,"url":"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2013\/11\/junit-logo.jpg","type":"image\/jpeg"}],"author":"Vinod Kumar Kashyap","twitter_card":"summary_large_image","twitter_creator":"@vinodkashyap","twitter_site":"@javacodegeeks","twitter_misc":{"Written by":"Vinod Kumar Kashyap","Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/examples.javacodegeeks.com\/java-development\/core-java\/junit\/junit-no-runnable-methods\/#article","isPartOf":{"@id":"https:\/\/examples.javacodegeeks.com\/java-development\/core-java\/junit\/junit-no-runnable-methods\/"},"author":{"name":"Vinod Kumar Kashyap","@id":"https:\/\/examples.javacodegeeks.com\/#\/schema\/person\/1d6281e8235e49b5b8614621c2445d2c"},"headline":"JUnit No Runnable Methods","datePublished":"2017-06-30T12:00:45+00:00","dateModified":"2019-03-20T11:48:11+00:00","mainEntityOfPage":{"@id":"https:\/\/examples.javacodegeeks.com\/java-development\/core-java\/junit\/junit-no-runnable-methods\/"},"wordCount":808,"commentCount":0,"publisher":{"@id":"https:\/\/examples.javacodegeeks.com\/#organization"},"image":{"@id":"https:\/\/examples.javacodegeeks.com\/java-development\/core-java\/junit\/junit-no-runnable-methods\/#primaryimage"},"thumbnailUrl":"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2013\/11\/junit-logo.jpg","keywords":["junit"],"articleSection":["junit"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/examples.javacodegeeks.com\/java-development\/core-java\/junit\/junit-no-runnable-methods\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/examples.javacodegeeks.com\/java-development\/core-java\/junit\/junit-no-runnable-methods\/","url":"https:\/\/examples.javacodegeeks.com\/java-development\/core-java\/junit\/junit-no-runnable-methods\/","name":"JUnit No Runnable Methods - Java Code Geeks","isPartOf":{"@id":"https:\/\/examples.javacodegeeks.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/examples.javacodegeeks.com\/java-development\/core-java\/junit\/junit-no-runnable-methods\/#primaryimage"},"image":{"@id":"https:\/\/examples.javacodegeeks.com\/java-development\/core-java\/junit\/junit-no-runnable-methods\/#primaryimage"},"thumbnailUrl":"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2013\/11\/junit-logo.jpg","datePublished":"2017-06-30T12:00:45+00:00","dateModified":"2019-03-20T11:48:11+00:00","description":"In this tutorial, we shall show users the usage of JUnit and explains the reason behind the JUnit No Runnable Methods error. We live in a fast age","breadcrumb":{"@id":"https:\/\/examples.javacodegeeks.com\/java-development\/core-java\/junit\/junit-no-runnable-methods\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/examples.javacodegeeks.com\/java-development\/core-java\/junit\/junit-no-runnable-methods\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/examples.javacodegeeks.com\/java-development\/core-java\/junit\/junit-no-runnable-methods\/#primaryimage","url":"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2013\/11\/junit-logo.jpg","contentUrl":"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2013\/11\/junit-logo.jpg","width":150,"height":150},{"@type":"BreadcrumbList","@id":"https:\/\/examples.javacodegeeks.com\/java-development\/core-java\/junit\/junit-no-runnable-methods\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/examples.javacodegeeks.com\/"},{"@type":"ListItem","position":2,"name":"Java Development","item":"https:\/\/examples.javacodegeeks.com\/category\/java-development\/"},{"@type":"ListItem","position":3,"name":"Core Java","item":"https:\/\/examples.javacodegeeks.com\/category\/java-development\/core-java\/"},{"@type":"ListItem","position":4,"name":"junit","item":"https:\/\/examples.javacodegeeks.com\/category\/java-development\/core-java\/junit\/"},{"@type":"ListItem","position":5,"name":"JUnit No Runnable Methods"}]},{"@type":"WebSite","@id":"https:\/\/examples.javacodegeeks.com\/#website","url":"https:\/\/examples.javacodegeeks.com\/","name":"Java Code Geeks","description":"Java Examples and Code Snippets","publisher":{"@id":"https:\/\/examples.javacodegeeks.com\/#organization"},"alternateName":"JCG","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/examples.javacodegeeks.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/examples.javacodegeeks.com\/#organization","name":"Exelixis Media P.C.","url":"https:\/\/examples.javacodegeeks.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/examples.javacodegeeks.com\/#\/schema\/logo\/image\/","url":"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png","contentUrl":"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png","width":864,"height":246,"caption":"Exelixis Media P.C."},"image":{"@id":"https:\/\/examples.javacodegeeks.com\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/javacodegeeks","https:\/\/x.com\/javacodegeeks"]},{"@type":"Person","@id":"https:\/\/examples.javacodegeeks.com\/#\/schema\/person\/1d6281e8235e49b5b8614621c2445d2c","name":"Vinod Kumar Kashyap","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/examples.javacodegeeks.com\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/a11634ec460c849e8631b740af1b75cb68c9c58d5c2339c21bcd95f55b9af4f5?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/a11634ec460c849e8631b740af1b75cb68c9c58d5c2339c21bcd95f55b9af4f5?s=96&d=mm&r=g","caption":"Vinod Kumar Kashyap"},"description":"Vinod is Sun Certified and love to work in Java and related technologies. Having more than 13 years of experience, he had developed software's including technologies like Java, Hibernate, Struts, Spring, HTML 5, jQuery, CSS, Web Services, MongoDB, AngularJS, AWS. He is also a JUG Leader of Chandigarh Java User Group.","sameAs":["http:\/\/www.vinodkashyap.com\/","https:\/\/www.instagram.com\/vinodkashyap\/","https:\/\/in.linkedin.com\/in\/vinodkashyap","https:\/\/in.pinterest.com\/vinodkashyap\/","https:\/\/x.com\/vinodkashyap"],"url":"https:\/\/examples.javacodegeeks.com\/author\/vinod-kashyap\/"}]}},"_links":{"self":[{"href":"https:\/\/examples.javacodegeeks.com\/wp-json\/wp\/v2\/posts\/48249","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/examples.javacodegeeks.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/examples.javacodegeeks.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/examples.javacodegeeks.com\/wp-json\/wp\/v2\/users\/112"}],"replies":[{"embeddable":true,"href":"https:\/\/examples.javacodegeeks.com\/wp-json\/wp\/v2\/comments?post=48249"}],"version-history":[{"count":0,"href":"https:\/\/examples.javacodegeeks.com\/wp-json\/wp\/v2\/posts\/48249\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/examples.javacodegeeks.com\/wp-json\/wp\/v2\/media\/6678"}],"wp:attachment":[{"href":"https:\/\/examples.javacodegeeks.com\/wp-json\/wp\/v2\/media?parent=48249"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/examples.javacodegeeks.com\/wp-json\/wp\/v2\/categories?post=48249"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/examples.javacodegeeks.com\/wp-json\/wp\/v2\/tags?post=48249"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}