# Quick Start Guide

## Run Your First Test

1. **Verify jPOS server is running on port 14001**

2. **Test connectivity:**
   ```bash
   cd /var/www/internaltesting/meghana/prverification/jposTestCases
   elixir test_connectivity.exs
   ```

3. **Run a few specific tests first:**
   ```bash
   # Test SALE transactions
   elixir run_tests.exs --type sale --filter SALE-001,SALE-002,SALE-008
   
   # Test VOID transactions
   elixir run_tests.exs --type void --filter VOID-001,VOID-002,VOID-003
   
   # Test LOGON transactions
   elixir run_tests.exs --type logon --filter LOGON-001,LOGON-002,LOGON-016
   ```

4. **Run complete test suites:**
   ```bash
   # Run all SALE tests (50 cases)
   elixir run_tests.exs --type sale
   
   # Run all VOID tests (30 cases)
   elixir run_tests.exs --type void
   
   # Run all REFUND tests (35 cases)
   elixir run_tests.exs --type refund
   
   # Run all REVERSAL tests (40 cases)
   elixir run_tests.exs --type reversal
   
   # Run all LOGON tests (40 cases)
   elixir run_tests.exs --type logon
   
   # Run ALL tests (195 cases)
   elixir run_tests.exs --type all
   ```

5. **Check the reports:**
   ```bash
   ls -lh reports/
   cat reports/summary_*.txt
   ```

## Common Commands

```bash
# Test by transaction type
elixir run_tests.exs --type sale      # 50 SALE test cases
elixir run_tests.exs --type void      # 30 VOID test cases
elixir run_tests.exs --type refund    # 35 REFUND test cases
elixir run_tests.exs --type reversal  # 40 REVERSAL test cases
elixir run_tests.exs --type logon     # 40 LOGON test cases
elixir run_tests.exs --type all       # All 195 test cases

# Test specific scenarios
elixir run_tests.exs --type sale --filter SALE-001,SALE-002,SALE-003
elixir run_tests.exs --type void --filter VOID-001,VOID-010,VOID-020
elixir run_tests.exs --type refund --filter REFUND-001,REFUND-015
elixir run_tests.exs --type reversal --filter REVERSAL-001,REVERSAL-008
elixir run_tests.exs --type logon --filter LOGON-001,LOGON-016,LOGON-019

# Run with different configurations
elixir run_tests.exs --type sale --port 9103
elixir run_tests.exs --type all --timeout 30000
elixir run_tests.exs --type sale --host 192.168.1.100 --port 14001
```

## What to Check

1. **Console Output**: See real-time test results
2. **Summary Report**: Overall pass/fail statistics
3. **Detailed Report**: Full packet dumps and field details

## Expected Behavior

- ✓ Green checkmarks = Tests passed
- ✗ Red X marks = Tests failed (check expected vs actual)
- ⚠ Warning = Errors (connection issues, etc.)

## Transaction Types Overview

| Type | Test Cases | MTI Request | MTI Response | Processing Code |
|------|------------|-------------|--------------|------------------|
| SALE | 50 | 0200 | 0210 | 000000 |
| VOID | 30 | 0200 | 0210 | 200000 |
| REFUND | 35 | 0200 | 0210 | 200000 |
| REVERSAL | 40 | 0400 | 0410 | 000000 |
| LOGON | 40 | 0800 | 0810 | 990000 |
| **TOTAL** | **195** | | | |

## Next Steps

1. Review failed tests in detailed report
2. Adjust expected values in CSV if needed
3. Add new test cases for your specific scenarios
4. Run comprehensive regression testing with `--type all`
