Task verification

Task Verification & Assignment Guide

Assign tasks with automated test rules and verify them in real time across React, Next.js, Angular, Node.js, Python and machine learning projects using thinknsh submit <task-id>.

1. The Verification Lifecycle

ThinkNCollab uses a Deterministic Judge Engine. Rather than manual checking, every task can have an objective, machine-executable acceptance test (testConfig).

2. How to Assign a Task (Team Lead / Manager)

Assigning a task with verification takes less than 30 seconds on the Board:

  • Go to your Board and click "+ Add Task" in any column.
  • Enter the Task Title (e.g. "Build User Login Route").
  • Choose the Assignee from your room members dropdown (e.g. Rahul Singh).
  • Under Verification Strategy, choose HTTP, Browser, Build, or Custom JSON.
  • Click Create Task. The developer instantly gets notified on their terminal and dashboard!

3. How to Submit & Verify (Developer Guide)

Jab aapka code taiyar ho jaye, verification execute karne ka tareeka:

4. Multi-Stack Test Config Templates

Select your framework below to view and copy the exact JSON to paste into your task's testConfig:

React (Vite / CRA): Uses headless Chromium to open the SPA, click buttons, fill forms, and assert rendered DOM elements.

code
{
"type": "browser",
"url": "http://localhost:5173",
"flow": [
{ "action": "fill", "selector": "#task-input", "value": "Finish TNC Documentation" },
{ "action": "click", "selector": "#add-btn" },
{ "action": "waitForElement", "selector": ".task-item" }
],
"expect": {
"element": ".task-item",
"text": "Finish TNC Documentation"
}
}

Next.js (App Router / SSR): Verifies pages, routes, or full production builds.

code
{
"type": "exitCode",
"command": "npx next build",
"value": 0
}
code
{
"type": "browser",
"url": "http://localhost:3000/dashboard",
"expect": {
"element": "h1",
"text": "Welcome to Dashboard"
}
}

Angular: Verifies dynamic Angular components, forms, or Karma test runners.

code
{
"type": "browser",
"url": "http://localhost:4200",
"flow": [
{ "action": "fill", "selector": "#user-email", "value": "test@user.com" },
{ "action": "click", "selector": "#submit-btn" },
{ "action": "waitForElement", "selector": ".alert-success" }
],
"expect": {
"element": ".alert-success",
"text": "Saved Successfully"
}
}
code
{
"type": "exitCode",
"command": "npx ng test --watch=false --browsers=ChromeHeadless",
"value": 0
}

Plain HTML / Vanilla JS: Simple static sites or local frontend prototypes.

code
{
"type": "browser",
"url": "http://localhost:8080/index.html",
"flow": [
{ "action": "click", "selector": "#theme-toggle-btn" }
],
"expect": {
"element": "body.dark-mode"
}
}

Node.js / Express: Probes live REST API endpoints and checks JSON body values.

code
{
"type": "http",
"baseUrl": "http://localhost:3000",
"endpoint": "/api/users",
"method": "POST",
"headers": {
"Content-Type": "application/json"
},
"body": {
"email": "raman@thinkncollab.com",
"name": "Raman"
},
"expect": {
"status": 201,
"body": {
"success": { "eq": true },
"user.email": { "eq": "raman@thinkncollab.com" },
"user.id": { "exists": true }
}
}
}

Python (FastAPI / Flask / Django): Run PyTest test suites or probe live API endpoints.

code
{
"type": "exitCode",
"command": "pytest tests/ -v",
"value": 0
}
code
{
"type": "http",
"baseUrl": "http://localhost:8000",
"endpoint": "/health",
"method": "GET",
"expect": {
"status": 200,
"body": {
"status": { "eq": "healthy" }
}
}
}

Machine Learning (PyTorch / Scikit-Learn): Condition-based thresholds (gte, lte).

Your Python evaluation script outputs JSON metrics:

code
import json
# Evaluation logic...
print(json.dumps({"accuracy": 0.89, "loss": 0.14, "f1_score": 0.87}))
code
{
"type": "json",
"command": "python evaluate.py",
"condition": {
"accuracy": { "gte": 0.85 },
"loss": { "lte": 0.20 },
"f1_score": { "gte": 0.80 }
}
}

Local CI/CD Pipeline (TNC Build): Runs sequential steps from .tnc/workflows/tnc-ci.yml.

code
{
"type": "tnc-build"
}
bash
name: Full Project Pipeline
steps:
- name: Install Dependencies
run: npm install
- name: Type Check & Lint
run: npm run lint
- name: Run Test Suite
run: npm test -- --watchAll=false
- name: Compile Production Build
run: npm run build

5. Troubleshooting & Frequently Asked Questions

Q: Playwright error: "Executable doesn't exist"

Terminal me Chromium download karein: npx playwright install chromium.

Q: "Connection Refused at localhost:3000"

Aapka frontend ya backend server doosre terminal window me running hona chahiye tabhi submit use probe kar payega.

Q: PyTest ya Jest ka test loop khatam nahi ho raha?

Interactive watch mode disable karein: npm test -- --watchAll=false ya CI=true npm test.