[JAVA] How to build SquashTM and how to support Japanese

What is SquashTM

SquashTM is a web-based test management tool. We support multilingualization, but unfortunately we do not support Japanese. Also, like a natural right, the characters are garbled.

This time, I will build SquashTM to fix garbled characters and find out how to support Japanese.

How to build

There are some official sentences, but they are old.

Very old https://sites.google.com/a/henix.fr/wiki-squash-tm/developer/how-to-install-squashtm-project-into-eclipse

A little old https://bitbucket.org/nx/squashtest-tm/wiki/devguide/HowToInstallInIDE.md#!install-in-eclipse

Advance preparation

Prepare the following. ・ Java 8 or above ・ Eclipse ・ Mvn3.3 or above ・ ToroiseHg (Distributed configuration management tool like Git)

The plugins to put in eclipse are as follows ・ Spring IDE image.png

・ Groovy Development Tools image.png

How to build and run

From source code acquisition to mvn install

cd myeclipseworkspace
hg clone https://bitbucket.org/nx/squashtest-tm
cd squashtest-tm
mvn clean install -DskipTests -DskipITs
#The following may not be needed
cd provision
mvn clean install -DskipTests

com.mycila: If you get an error with license-maven-plugin

The following error may occur.

Failed to execute goal com.mycila:license-maven-plugin:2.11:check"

In this case, execute the following command in the root folder.

mvn license:format

If you get an error in provision

The following error may occur with mvn install of provision.

Non-resolvable parent POM for org.squashtest.tm:squash-tm-provision:[unknown-version]: Could not find artifact org.squashtest.tm:squash-tm:pom:1.19.0.RC3-SNAPSHOT and 'parent.relativePath' points at no local POM

This happens when parent in pom.xml in provision folder and pom.xml in parent folder are inconsistent. As of July 6, 2019, the following modifications were required


    <version>1.19.0.RELEASE</version> <<<<<<The version here was inconsistent with my parents

Operation in eclipse

Do the following in eclipse

Project import

1 Select [File]> [Import] from the menu 2 Cook [Maven]> [Existing Maven Project] image.png 3 Select the folder created by "hg clone"

Introduced provision module to Eclipse

This work may not be necessary in the latest.

1 Select [Window]> [Settings] from the menu. 2 Select [Plugin Development]> [Target Platform] and press the "Add" button. image.png 3 Select "Start with empty target definition" image.png 4 Press the "Add" button on the target content image.png 5 Select a directory. image.png 6 Enter "squashtest-tm / provision / target / eclipse-provision / bundles" for the location. 7 Target content will be added, so enter the following values in the Arguments tab. Program arguments:

-os ${target.os} -ws ${target.ws} -arch ${target.arch} -nl ${target.nl} -consoleLog -console

** VM arguments: **

  1. After completion, check the target definition you just added.

Spring IDE plugin settings

1 Select [Run]> [Run Configuration] from the menu. 2 Right-click [Spring Boot Application] on the execution configuration screen and press the "New" button. 3 Enter a value on each tab ** Spring Boot tab ** image.png

・ Project: tm.web ・ Main type: org.squashtest.tm.SquashTm -Profile: h2, dev

** Argument tab ** image.png

Program arguments: -XX: MaxPermSize = 256m -Xmx1024m

** Classpath tab ** image.png

① After selecting "User Entry", press the "Expansion Button" ② Select "Add Folder" ③ Enter "tm.web/target/wro4j-spring-boot"

Execution method

Since the execution configuration is set in the Spring IDE settings, press the execute button there. Then access the following from your browser. (http://localhost:8080/squash

What to do if an error occurs during startup

The startup sometimes failed. In this case, I tried the following. In addition, it seems that it is working even if there is an exception in the log

  1. Try erasing the database once ・ Tm \ data \ squash-tm.mv.db ・ Tm \ data \ squash-tm.trace.db

  2. Try "mvn clean install".

Try to fix various things

Try to fix garbled characters on the "Attach Test Cases" screen

Japanese characters are garbled when associating test cases with the test suite. image.png

The cause is that contentType is not set in jsp. Modify as follows.


<%@ taglib prefix="authz" tagdir="/WEB-INF/tags/authz"%>

↓ Add this
<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>

<c:url var="testSuiteUrl" value="/test-suites/${ testSuite.id }" />

Since there are some pages that are quite garbled, it is better to review whether the encode is specified for jsp, but only error.jsp has the character code specified, so I left it as it is.

If Japanese characters are garbled as a whole, it is considered that you made a mistake when creating the database and it does not support utf8.

Try adding a Japanese message.

SquashTM can support multiple languages by copying message resources.

    1. Create messages_ja.properties by copying tm \ tm.web \ src \ main \ webapp \ WEB-INF \ messages \ tm \ messages.properties.
  1. Open in Limy Property Editor
    1. Replace with Japanese After fixing, "tm-web" is "mvn install" and then restarted.

The language is switched according to the language specified by the browser.

Replacement and reboot method for CentOS7

The method of placing the created war on the server is as follows

1 Renamed tm / tm.web / target / tm.webXXXXXXX.war to squash-tm.war 2 Stop the service with "sudo service squash-tm stop" 3 For CentOS7, copy to "/ usr / lib / squash-tm / bundles /" 4 Resume service with "sudo service squash-tm stop"

By the way, the log is below, so you should monitor it around tail -f. /var/log/squash-tm/squash-tm.log

at the end

Now you can fix any bugs in SquashTM on your own. It's safe even if there are bugs! (Pride)

Recommended Posts

How to build SquashTM and how to support Japanese
How to build android-midi-lib
How to build API with GraphQL and Rails
[Rails] How to use Gem'rails-i18n' for Japanese support
How to build parquet-tools and merge Parquet files
What happened in "Java 8 to Java 11" and how to build an environment
How to use StringBurrer and Arrays.toString.
How to use EventBus3 and ThreadMode
[Rails] How to write in Japanese
How to call classes and methods
How to use equality and equality (how to use equals)
How to connect Heroku and Sequel
How to convert LocalDate and Timestamp
How to build vim on Ubuntu 20.04
How to build CloudStack using Docker
How to translate enum into Japanese and generate linked radio buttons
How to install the language used in Ubuntu and how to build the environment
How to use OrientJS and OrientDB together
Don't know how to build task'credentials: edit'
[Java] How to output and write files!
How to set up and use kapt
How to find the tens and ones
[Easy] How to upgrade Ruby and bundler
How to use substring and substr methods
Note: [Docker] How to start and stop
How to write and explain Dockerfile, docker-compose
[Rails] How to translate devise into Japanese
How to use @Builder and @NoArgsConstructor together
How to build Rails 6 environment with Docker
How to display error messages in Japanese
[Ruby] How to convert from lowercase to uppercase and from uppercase to lowercase
How to output Excel and PDF using Excella
[Java] How to use FileReader class and BufferedReader class
[Java] How to get and output standard input
[Ruby] How to use gsub method and sub method
How to play audio and music using javascript
How to translate Rails into Japanese in general
How to deploy
Git and GitHub ~ How to fix common errors ~
How to set up and operate jEnv (Mac)
How to use enum (introduction of Japanese notation)
How to use scope and pass processing (Jakarta)
How to get and study java SE8 Gold
How to execute processing before and after docker-entrypoint.sh
How to find the total score and average score
[Rails] How to build an environment with Docker
[Rails] How to get success and error messages
How to build a Pytorch environment on Ubuntu
How to build the simplest blockchain in Ruby
How to build an executable jar in Maven
Rails scope anti-patterns and how to eliminate them
Ruby How to convert between uppercase and lowercase
How to utilize knowledge to reduce support work by 10 to 20%
How to access Java Private methods and fields
[Rails] How to convert UC time display to Japanese time display
[Java] How to use Calendar class and Date class
How to quit Docker for Mac and build a Docker development environment with Ubuntu + Vagrant
Plans to support JDK 11 for Eclipse and Spring Boot
How to build Docker + Springboot app (for basic learning)
[Ruby on Rails] How to write enum in Japanese
[Java] Types of comments and how to write them