Testng Test Cases

Topics related to running, modifying, or working with the Broadleaf Commerce Demo application

Moderator: jocanas

prabhat.kataria
Intermediate
Intermediate
Posts: 91
Joined: Sat Mar 01, 2014 12:23 am

Testng Test Cases

Postby prabhat.kataria » Sat Oct 11, 2014 1:07 am

I want to write test cases to test some part of code in site module. I see testng library is added by default in DemoSite pom.xml and thus trying to use the same to write test case. Also I want to use spring context so that I can use actual beans that are created in dev or prod environment.

I followed tutorial at http://www.mkyong.com/unittest/testng-s ... n-example/ but everytime I end up with exceptions saying some or the other bean not found. I added all the spring xml files that are inside WEB-INF to @ContextConfiguration but still no help.

Does anybody have a sample test case using spring context

@TeamBLC you guys must be using test cases to test your changes before pushing it in new release. Can you post a sample test case which spring context?

phillipuniverse
Team Member
Team Member
Posts: 1563
Joined: Tue Dec 20, 2011 12:11 pm

Re: Testng Test Cases

Postby phillipuniverse » Sun Oct 12, 2014 9:57 pm

Hey Prabhat, we are actually migrating to use Groovy and Spock for our test cases. We have already done some initial work to make this easier with the commits on https://github.com/BroadleafCommerce/Br ... ssues/1127. Eventually all of our testing will be based on Spock and Groovy with the Spring 4 integration test project.

If you want to make use of what we currently have in the integration test project, you should extend from BaseTest (https://github.com/BroadleafCommerce/Br ... eTest.java) and add in your custom applicationContext files to the static 'moduleContexts' list.

chennaiwebdesign
Newbie
Newbie
Posts: 1
Joined: Fri Nov 07, 2014 7:45 am
Contact:

Re: Testng Test Cases

Postby chennaiwebdesign » Fri Nov 07, 2014 7:48 am

Hi guys,Thanks for your information.It more important for us.How to write test cases.Please any one reply me.Thanks advance. :D

908808303@qq.com
Newbie
Newbie
Posts: 1
Joined: Thu Sep 10, 2015 10:24 pm

Re: Testng Test Cases

Postby 908808303@qq.com » Fri Nov 06, 2015 2:24 am

I followed the document
http://www.broadleafcommerce.com/docs/core/current/tutorials/testing-tutorials/groovy-spock-integration-test
but no test to run. Neithor java test nor groovy test file to run. I attached my DemoSite/pom.xml file.
This was the first time I use groovy/spock.
@phillipuniverse Can you post a sample test case
Attachments
pom.zip
DemoSite pom
(3.05 KiB) Downloaded 22 times

georgiamenzel
Newbie
Newbie
Posts: 5
Joined: Mon Jun 06, 2016 4:34 am

Re: Testng Test Cases

Postby georgiamenzel » Mon Jun 06, 2016 4:47 am

First i would like thank you for the sharing .this very important information for me.I so many cases we need to create so many test cases for testing process.This is the very useful information for me.Thank you so much


Return to “Broadleaf Commerce Demo”

Who is online

Users browsing this forum: No registered users and 2 guests