Running Unit test cases after running functional test cases?

Hi,

I have developed DevOps pipeline for my Website which is written in only in JSP. As part of this pipeline, I will be using the below tools.

Integration tool: Jenkins
Build Tool: Maven
Unit testing Tool: JWebUnit
Funtional testing tool: Selenium
Static analysis too:SonarQube
Binary Management tool: Artifactory
Deployment Tool: Ansible
Release management tool: Docker

My question is if we can run Functional test first and then Unit testing in DevOps pipeline. Here is the reason, why I am planning to do this.

  1. JWebUnit Unit testing tool which is meant to test JSP pages, we can test using this tool only after we deploy website on tomcat server.
  2. I am planning to create .war file first after running “mvn clen install” command and then run Functional tests which is taken care by maven tool.
  3. By taking the war file generated in step2, I am planning to run Unit test case(Not using mvn script) after deploying war file.

Please suggest if this approach is ok for DevOps pipeline. Thanks.

Please suggest if this approach can