__ * All information is as of the time the article was created .__
--A framework for unit testing programs that access DB [1] --Positioned as "extension of JUnit" [1]
Hardware: MacBook Pro (Retina, 13-inch, Mid 2014) OS: MacOS Mojave 10.14.3 IDE: Eclipse 2019-03 (Japaneseized) DBMS: MySQL 8.0.16 JUnit: JUnit5
Access the following site
https://search.maven.org/search?q=g:org.dbunit
Click the download icon
Click "jar" <img width = "1150" alt = "Screenshot 2019-06-16 17.14.35.png " src = "https://qiita-image-store.s3.ap-northeast-1" .amazonaws.com/0/210617/2d3e2f09-2361-c72d-925b-f1287de0d537.png ">
dbunit-2.6.0.jar
will be downloaded, so move to any directory
Start Eclipse
In "Project Explorer", right-click the project that uses DBUnit.
Click "Properties".
Select "Java Build Path" and click "Library".
Click "Add External JAR". <img width = "768" alt = "Screenshot 2019-06-16 17.18.38.png " src = "https://qiita-image-store.s3.ap" -northeast-1.amazonaws.com/0/210617/56e44814-2ef6-bbf1-c8ef-f8839ba485e5.png ">
Select the dbunit-2.6.0.jar
placed in 4. and click" Open ". <img width =" 372 "alt =" Screenshot 2019-06-16 17.19.32.png "src = "https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/210617/dd2a6a5f-bca4-bec2-44c9-dbe8060966bf.png ">
Click "Apply and Close"
Access the following site
https://www.slf4j.org/download.html
Click "slf4j-1.7.26.zip" <img width = "1127" alt = "Screenshot 2019-06-16 17.26.47.png " src = "https://qiita-image-store.s3" .ap-northeast-1.amazonaws.com/0/210617/4bda7e0c-9c0f-aca1-878f-16bcb08e36a1.png ">
slf4j-1.7.26.zip
will be downloaded, so unzip it.
Move slf4j-1.7.26 / slf4j-api-1.7.26.jar
and slf4j-1.7.26 / slf4j-nop-1.7.26.jar
to any directory
Start Eclipse
In "Project Explorer", right-click the project that uses DBUnit.
Click "Properties".
Select "Java Build Path" and click "Library".
Click "Add External JAR". <img width = "768" alt = "Screenshot 2019-06-16 17.18.38.png " src = "https://qiita-image-store.s3.ap" -northeast-1.amazonaws.com/0/210617/58a6bb06-9d6a-3194-ad12-4293fb5b1b39.png ">
Select slf4j-api-1.7.26.jar
and slf4j-nop-1.7.26.jar
placed in 4. and click "Open". <img width = "425" alt = " Screenshot 2019-06-16 17.20.07.png "src =" https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/210617/916ace08-a268-83ed-07ed- f6d44b383b9c.png ">
Click "Apply and Close"
Access the following site.
http://poi.apache.org/download.html
Click "poi-bin-4.1.0-20190412.zip" in "Binary Distribution". <img width = "1267" alt = "Screenshot 2019-06-17 18.57.00.png " src = "https" //qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/210617/8374a066-a845-8f86-d171-699aa31a6693.png ">
poi-bin-4.1.0-20190412.zip
will be downloaded, so unzip it.
Move the unzipped folder poi-bin-4.1.0
to any directory.
Start Eclipse.
In "Project Explorer", right-click the project that uses DBUnit.
Click "Properties".
Select "Java Build Path" and click "Library".
Click "Add External JAR". <img width = "768" alt = "Screenshot 2019-06-16 17.18.38.png " src = "https://qiita-image-store.s3.ap" -northeast-1.amazonaws.com/0/210617/58a6bb06-9d6a-3194-ad12-4293fb5b1b39.png ">
Select the following 4 jar files and click "Open".
poi-4.1.0.jar
poi-ooxml-4.1.0.jar
poi -ooxml-schemas-4.1.0.jar
ʻooxml-lib / xmlbeans-3.1.0.jar`
Click "Apply and Close".
Create a DAO class and test it (article creation)
[1] [Think IT] Part 1: What is Java unit test tool DBUnit? (1/3)
Recommended Posts